Commit dcd38334 authored by Ian Hickson's avatar Ian Hickson Committed by GitHub

Turn and if != null into an elvis operator (#9190)

parent 20e214fa
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment