fix widget built twice during warm up frame (#39079)

This commit is contained in:
chunhtai
2019-09-06 09:46:18 -07:00
committed by GitHub
parent 296e97f322
commit 57d714ebb8
5 changed files with 53 additions and 80 deletions

View File

@@ -993,6 +993,14 @@ class AutomatedTestWidgetsFlutterBinding extends TestWidgetsFlutterBinding {
_currentFakeAsync.flushMicrotasks();
}
@override
void scheduleAttachRootWidget(Widget rootWidget) {
// We override the default version of this so that the application-startup widget tree
// build does not schedule timers which we might never get around to running.
attachRootWidget(rootWidget);
_currentFakeAsync.flushMicrotasks();
}
@override
Future<void> idle() {
final Future<void> result = super.idle();