mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Fix missing return statements on function literals (#33058)
This commit is contained in:
parent
539ff20384
commit
c2a93bd545
@ -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,8 +79,9 @@ 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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user