Unverified Commit 7ce28d12 authored by Alexandre Ardhuin's avatar Alexandre Ardhuin Committed by GitHub

use Duration.zero (#23218)

parent d28fa281
......@@ -958,13 +958,13 @@ class CupertinoTimerPicker extends StatefulWidget {
/// positive integer factor of 60.
CupertinoTimerPicker({
this.mode = CupertinoTimerPickerMode.hms,
this.initialTimerDuration = const Duration(),
this.initialTimerDuration = Duration.zero,
this.minuteInterval = 1,
this.secondInterval = 1,
@required this.onTimerDurationChanged,
}) : assert(mode != null),
assert(onTimerDurationChanged != null),
assert(initialTimerDuration >= const Duration(seconds: 0)),
assert(initialTimerDuration >= Duration.zero),
assert(initialTimerDuration < const Duration(days: 1)),
assert(minuteInterval > 0 && 60 % minuteInterval == 0),
assert(secondInterval > 0 && 60 % secondInterval == 0),
......
......@@ -299,7 +299,7 @@ class Ticker {
// We intentionally don't null out _startTime. This means that if start()
// was ever called, the object is now in a bogus state. This weakly helps
// catch cases of use-after-dispose.
_startTime = const Duration();
_startTime = Duration.zero;
return true;
}());
}
......
......@@ -773,7 +773,7 @@ class AutomatedTestWidgetsFlutterBinding extends TestWidgetsFlutterBinding {
@override
Future<void> idle() {
final Future<void> result = super.idle();
_currentFakeAsync.elapse(const Duration());
_currentFakeAsync.elapse(Duration.zero);
return result;
}
......
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