mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
replace const Duration() with Duration.ZERO (#8835)
This commit is contained in:
parent
6cd552fe69
commit
90aa2957fe
@ -53,12 +53,12 @@ class TestServiceExtensionsBinding extends BindingBase
|
||||
void doFrame() {
|
||||
frameScheduled = false;
|
||||
if (ui.window.onBeginFrame != null)
|
||||
ui.window.onBeginFrame(const Duration());
|
||||
ui.window.onBeginFrame(Duration.ZERO);
|
||||
}
|
||||
|
||||
Future<Null> flushMicrotasks() {
|
||||
final Completer<Null> completer = new Completer<Null>();
|
||||
new Timer(const Duration(), completer.complete);
|
||||
Timer.run(completer.complete);
|
||||
return completer.future;
|
||||
}
|
||||
}
|
||||
|
||||
@ -101,8 +101,8 @@ void main() {
|
||||
);
|
||||
final List<dynamic> events = await channel.receiveBroadcastStream('hello').toList();
|
||||
expect(events, orderedEquals(<String>['hello1', 'hello2']));
|
||||
await new Future<Null>.delayed(const Duration());
|
||||
await new Future<Null>.delayed(Duration.ZERO);
|
||||
expect(cancelled, isTrue);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -255,7 +255,7 @@ void main() {
|
||||
}
|
||||
|
||||
Future<Null> eventFiring(WidgetTester tester) async {
|
||||
await tester.pump(const Duration());
|
||||
await tester.pump(Duration.ZERO);
|
||||
}
|
||||
|
||||
class StringCollector extends StreamBuilderBase<String, List<String>> {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user