Skip to content

Commit

Permalink
We allow minus values for reminders, because all day event reminders …
Browse files Browse the repository at this point in the history
…on that day are set with "minus minutes" (eg. -300)
  • Loading branch information
NaoKreuzeder committed Apr 2, 2024
1 parent 07df224 commit e08b1fe
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/src/models/reminder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ class Reminder {
/// The time when the reminder should be triggered expressed in terms of minutes before the start of the event
int? minutes;

Reminder({@required this.minutes})
: assert(minutes != null && minutes >= 0,
'Minutes must be greater than or equal than zero');
//2.4.24 We allow minus values for reminders, because all day event reminders on that day are set with "minus minutes" (eg. -300)
Reminder({@required this.minutes}) : assert(minutes != null, 'Minutes must not be null');

Reminder.fromJson(Map<String, dynamic> json) {
minutes = json['minutes'] as int;
Expand Down

0 comments on commit e08b1fe

Please sign in to comment.