Make flutter_driver work with sync-async (#16798)

This commit is contained in:
Mikkel Nygaard Ravn
2018-04-20 19:31:43 +02:00
committed by GitHub
parent 315993efb3
commit 776cf24764

View File

@@ -206,6 +206,9 @@ class FlutterDriverExtension {
/// Runs `finder` repeatedly until it finds one or more [Element]s.
Future<Finder> _waitForElement(Finder finder) async {
// TODO(mravn): This method depends on async execution. A refactoring
// for sync-async semantics is tracked in https://github.com/flutter/flutter/issues/16801.
await new Future<void>.value(null);
if (_frameSync)
await _waitUntilFrame(() => SchedulerBinding.instance.transientCallbackCount == 0);