theexidge / routinger

Routinger is a task scheduler app that is made to make you a better person at no extra cost. The code is open-source. Dart language and Flutter framework are used extensively.
GNU Affero General Public License v3.0
28 stars 22 forks source link

Several print statements in the console and usage of unnecessary null checks #6

Closed AyoubBoulahtar closed 2 years ago

AyoubBoulahtar commented 2 years ago

Describe the bug The app logs a lot of unneeded debugging statements. Also the usage of null checks is unnecessary and not good for readability.

null checks

Expected behavior Slight improvements could do for this stuff.

Kushalrock commented 2 years ago

Yes that's true. The null checks could be improved. The print statements were made to facilitate debugging but they were not removed and this is cluttering the debug console.

Thank you for pointing out the issue

If you're up for it. I can assign you the task.

AyoubBoulahtar commented 2 years ago

I could make the adjustments, you can assign it to me.

Kushalrock commented 2 years ago

Okay I am assigning the task to you. But yes take care not to break anything because I know for a fact that null check is actually required if a person exit the calendar or time chooser without selecting anything. So we can use the ?. operator instead of null check.

AyoubBoulahtar commented 2 years ago

I cleaned the project from all obvious unnecessary print statements, although this List is not used in the app at all.

What's your opinion about that ?

print cache
AyoubBoulahtar commented 2 years ago

For the null checks, I think if we did a validator instead of checking if the value was null, it would work great, a user can't create scheduled task without specifiying Date and Time for it.

Kushalrock commented 2 years ago

Yes pending notification list is not used for the time being you can comment it out.

Without specifying date and time user cannot create scheduled task but they can exit out if the calendar and time picker by tapping else where in the screen in that case the date picker and time picker returns null.

AyoubBoulahtar commented 2 years ago

Yes they can exit the calendar and time picker, but they can not create a task without those specified, isn't that the expected behavior?