Turn and if != null into an elvis operator (#9190)
This commit is contained in:
parent
20e214fa71
commit
dcd3833455
@ -389,8 +389,7 @@ class _MonthPickerState extends State<MonthPicker> {
|
||||
final DateTime tomorrow = new DateTime(_todayDate.year, _todayDate.month, _todayDate.day + 1);
|
||||
Duration timeUntilTomorrow = tomorrow.difference(_todayDate);
|
||||
timeUntilTomorrow += const Duration(seconds: 1); // so we don't miss it by rounding
|
||||
if (_timer != null)
|
||||
_timer.cancel();
|
||||
_timer?.cancel();
|
||||
_timer = new Timer(timeUntilTomorrow, () {
|
||||
setState(() {
|
||||
_updateCurrentDate();
|
||||
|
Loading…
x
Reference in New Issue
Block a user