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