Skip to content

Commit

Permalink
fixed bug where no set initialTime in SBBTimePicker results in an nul…
Browse files Browse the repository at this point in the history
…l check error
  • Loading branch information
VanHoangTran committed Oct 17, 2023
1 parent e430e25 commit 2b7d1c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/src/picker/sbb_time_picker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ class SBBTimePicker extends StatefulWidget {

static TimeOfDay _initialTime(TimeOfDay? time) {
if (time == null) {
TimeOfDay.now();
return TimeOfDay.now();
}
return time!.replacing(hour: time.hour, minute: time.minute);
return time.replacing(hour: time.hour, minute: time.minute);
}

static TimeOfDay? _minimumDateTime(TimeOfDay? time, int minuteInterval) {
Expand Down

0 comments on commit 2b7d1c0

Please sign in to comment.