use Duration.zero (#23218)
This commit is contained in:
committed by
GitHub
parent
d28fa281f5
commit
7ce28d1277
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user