-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Null safety fixes #17
Conversation
@@ -14,7 +14,7 @@ class Bucket { | |||
final List<Task> tasks; | |||
|
|||
Bucket({ | |||
this.id = -1, | |||
this.id = 0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to 0 as discussed in #16.
lib/models/task.dart
Outdated
DateTime? endDate, | ||
bool? clearEndDate, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This allows for clearing the dates by setting them to null if the corresponding bool is true.
@@ -43,13 +43,16 @@ getRepeatAfterValueFromDuration(Duration? repeatAfter) { | |||
return repeatAfter.inHours; | |||
} | |||
|
|||
getDurationFromType(String? value, String? type) { | |||
Duration? getDurationFromType(String? value, String? type) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added return types to make it less ambiguous.
lib/pages/list/task_edit.dart
Outdated
endDate: _endDate, | ||
clearEndDate: _endDate == null, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The dates will be null when cleared.
I think I got all the bugs? If there is more let me know and I'll fix them.