Skip to content

Commit

Permalink
add await to fix analyzer (flutter#28157)
Browse files Browse the repository at this point in the history
  • Loading branch information
clocksmith authored Mar 1, 2019
1 parent d6c0f33 commit 338581b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/flutter_test/lib/src/widget_tester.dart
Original file line number Diff line number Diff line change
Expand Up @@ -297,9 +297,9 @@ class WidgetTester extends WidgetController implements HitTestDispatcher, Ticker
dynamic caughtException;
void handleError(dynamic error, StackTrace stackTrace) => caughtException ??= error;

Future<void>.microtask(() { binding.handleBeginFrame(duration); }).catchError(handleError);
await Future<void>.microtask(() { binding.handleBeginFrame(duration); }).catchError(handleError);
await idle();
Future<void>.microtask(() { binding.handleDrawFrame(); }).catchError(handleError);
await Future<void>.microtask(() { binding.handleDrawFrame(); }).catchError(handleError);
await idle();

if (caughtException != null) {
Expand Down

0 comments on commit 338581b

Please sign in to comment.