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 { ...@@ -243,6 +243,7 @@ class _LeaveBehindListItem extends StatelessWidget {
case DismissDirection.down: case DismissDirection.down:
assert(false); assert(false);
} }
return true;
}, },
background: Container( background: Container(
color: theme.primaryColor, color: theme.primaryColor,
......
...@@ -2250,4 +2250,5 @@ final HeroFlightShuttleBuilder _navBarHeroFlightShuttleBuilder = ( ...@@ -2250,4 +2250,5 @@ final HeroFlightShuttleBuilder _navBarHeroFlightShuttleBuilder = (
topNavBar: fromNavBar, topNavBar: fromNavBar,
); );
} }
return null;
}; };
...@@ -101,7 +101,7 @@ Future<T> _warnIfSlow<T>({ ...@@ -101,7 +101,7 @@ Future<T> _warnIfSlow<T>({
assert(future != null); assert(future != null);
assert(timeout != null); assert(timeout != null);
assert(message != 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. /// A convenient accessor to frequently used finders.
......
...@@ -764,6 +764,7 @@ class AutomatedTestWidgetsFlutterBinding extends TestWidgetsFlutterBinding { ...@@ -764,6 +764,7 @@ class AutomatedTestWidgetsFlutterBinding extends TestWidgetsFlutterBinding {
final Uint8List encoded = Uint8List.fromList(asset.readAsBytesSync()); final Uint8List encoded = Uint8List.fromList(asset.readAsBytesSync());
return Future<ByteData>.value(encoded.buffer.asByteData()); return Future<ByteData>.value(encoded.buffer.asByteData());
} }
return null;
}); });
} }
} }
......
...@@ -164,7 +164,7 @@ void main() { ...@@ -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 originalDevicePixelRatio = ui.window.devicePixelRatio;
final double originalTextScaleFactor = ui.window.textScaleFactor; final double originalTextScaleFactor = ui.window.textScaleFactor;
final TestWindow testWindow = retrieveTestBinding(tester).window; final TestWindow testWindow = retrieveTestBinding(tester).window;
......
...@@ -79,8 +79,9 @@ class Testbed { ...@@ -79,8 +79,9 @@ class Testbed {
} }
await test(); await test();
Cache.flutterRoot = originalFlutterRoot; Cache.flutterRoot = originalFlutterRoot;
return null;
} }
); );
}); });
} }
} }
\ No newline at end of file
...@@ -19,7 +19,7 @@ void main() { ...@@ -19,7 +19,7 @@ void main() {
setUp(() { setUp(() {
testbed = Testbed( testbed = Testbed(
setup: () { setup: () async {
fs.file('pubspec.yaml').createSync(); fs.file('pubspec.yaml').createSync();
fs.file('.packages').createSync(); fs.file('.packages').createSync();
fs.file('test/foo.dart').createSync(recursive: true); 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