From 9a16900ed12c38632af2eaf09c59a6556a7e515a Mon Sep 17 00:00:00 2001 From: Paul Berry Date: Thu, 23 May 2019 10:17:22 -0700 Subject: [PATCH] Pass an async callback to testWidgets. (#33260) The dart analyzer fails to warn about missing returns in function expressions due to a bug that has been fixed but not yet rolled into Flutter (see https://dart-review.googlesource.com/c/sdk/+/100301). So it failed to catch that https://github.com/flutter/flutter/pull/33217 accidentally introduced a call to `testWidgets` that passed it a synchronous callback. --- packages/flutter/test/painting/image_stream_test.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/flutter/test/painting/image_stream_test.dart b/packages/flutter/test/painting/image_stream_test.dart index e0e5b08218..0e69164b0a 100644 --- a/packages/flutter/test/painting/image_stream_test.dart +++ b/packages/flutter/test/painting/image_stream_test.dart @@ -607,7 +607,7 @@ void main() { await tester.pump(const Duration(milliseconds: 200)); // emit 2nd frame. }); - testWidgets('ImageStreamListener hashCode and equals', (WidgetTester tester) { + testWidgets('ImageStreamListener hashCode and equals', (WidgetTester tester) async { void handleImage(ImageInfo image, bool synchronousCall) { } void handleImageDifferently(ImageInfo image, bool synchronousCall) { } void handleError(dynamic error, StackTrace stackTrace) { }