Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Let's add horizontal padding around each task in the time planner #7

Merged
merged 3 commits into from
Jun 24, 2022

Conversation

kashua14
Copy link
Contributor

@kashua14 kashua14 commented Jun 19, 2022

My Suggestion:

  • Add horizontal padding for each task.
  • Fix the android example app.

Below is a code that has been added in the time_planner_task.dart file to achieve the horizontal padding

Positioned( ... 
   child: SizedBox(
       width: config.cellWidth!.toDouble() - config.horizontalTaskPadding!,
        child: Padding(
             padding: EdgeInsets.only(left: config.horizontalTaskPadding!.toDouble()),
          child: Material(...)
        ), // Padding
    ), // SizeBox
) // Positioned

The example app has been fully migrated to Flutter V2 and it runs perfectly fine.

kashua14 added 3 commits June 19, 2022 09:47
The Example app was crushing because of an outdated version of flutter that was deprecated. so I updated it to the latest version
Each task in the time planner has left and right padding. This padding can be adjusted through a parameter called "horizontalTaskPadding" in the time_planner_styles.dart file.
@kashua14 kashua14 marked this pull request as ready for review June 19, 2022 07:33
@Jamalianpour
Copy link
Owner

Hello and thanks for your pull request
I have 2 questions here:

  1. Why only horizontal padding?
  2. In the code I saw that you use left padding, so this only works on ltr languages right?

@kashua14
Copy link
Contributor Author

1. Why only horizontal padding?

  • I use the package in a timetable setting, where I display the lectures to be studied throughout the week. With the current implementation, the tasks seem to be cluttered. However, if you can add horizontal padding, it will be neat.

  • In horizontal padding, the time is not affected which I believe is the main purpose of the whole project. Adding vertical padding will shift the start & end time of the task by the padding.

2. In the code I saw that you use left padding, so this only works on ltr languages right?

No, it also supports rtr. The SizeBox widget in the Padding widget adds the right padding to the task.

@Jamalianpour Jamalianpour merged commit 51ba688 into Jamalianpour:master Jun 24, 2022
@kashua14
Copy link
Contributor Author

Thank you so much for considering my suggestion.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants