Commit c2a93bd5 authored by Sam Rawlins's avatar Sam Rawlins Committed by Michael Goderbauer

Fix missing return statements on function literals (#33058)

parent 539ff203
......@@ -243,6 +243,7 @@ class _LeaveBehindListItem extends StatelessWidget {
case DismissDirection.down:
assert(false);
}
return true;
},
background: Container(
color: theme.primaryColor,
......
......@@ -2250,4 +2250,5 @@ final HeroFlightShuttleBuilder _navBarHeroFlightShuttleBuilder = (
topNavBar: fromNavBar,
);
}
return null;
};
......@@ -101,7 +101,7 @@ Future<T> _warnIfSlow<T>({
assert(future != null);
assert(timeout != null);
assert(message != null);
return future..timeout(timeout, onTimeout: () { _log.warning(message); });
return future..timeout(timeout, onTimeout: () { _log.warning(message); return null; });
}
/// A convenient accessor to frequently used finders.
......
......@@ -764,6 +764,7 @@ class AutomatedTestWidgetsFlutterBinding extends TestWidgetsFlutterBinding {
final Uint8List encoded = Uint8List.fromList(asset.readAsBytesSync());
return Future<ByteData>.value(encoded.buffer.asByteData());
}
return null;
});
}
}
......
......@@ -164,7 +164,7 @@ void main() {
);
});
testWidgets('TestWindow can clear out fake properties all at once', (WidgetTester tester) {
testWidgets('TestWindow can clear out fake properties all at once', (WidgetTester tester) async {
final double originalDevicePixelRatio = ui.window.devicePixelRatio;
final double originalTextScaleFactor = ui.window.textScaleFactor;
final TestWindow testWindow = retrieveTestBinding(tester).window;
......
......@@ -79,6 +79,7 @@ class Testbed {
}
await test();
Cache.flutterRoot = originalFlutterRoot;
return null;
}
);
});
......
......@@ -19,7 +19,7 @@ void main() {
setUp(() {
testbed = Testbed(
setup: () {
setup: () async {
fs.file('pubspec.yaml').createSync();
fs.file('.packages').createSync();
fs.file('test/foo.dart').createSync(recursive: true);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment