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