prefer_void_to_null in flutter_localizations (#22826)

This commit is contained in:
Alexandre Ardhuin
2018-10-10 06:04:31 +02:00
committed by GitHub
parent 422e56c29c
commit bfedbd09b8
3 changed files with 4 additions and 4 deletions

View File

@@ -225,7 +225,7 @@ void main() {
});
}
Future<Null> _pumpBoilerplate(
Future<void> _pumpBoilerplate(
WidgetTester tester,
Widget child, {
Locale locale = const Locale('en', 'US'),

View File

@@ -47,7 +47,7 @@ Future<Offset> startPicker(WidgetTester tester, ValueChanged<TimeOfDay> onChange
return tester.getCenter(find.byKey(const Key('time-picker-dial')));
}
Future<Null> finishPicker(WidgetTester tester) async {
Future<void> finishPicker(WidgetTester tester) async {
final MaterialLocalizations materialLocalizations = MaterialLocalizations.of(tester.element(find.byType(RaisedButton)));
await tester.tap(find.text(materialLocalizations.okButtonLabel));
await tester.pumpAndSettle(const Duration(seconds: 1));
@@ -130,7 +130,7 @@ void main() {
const List<String> labels12To11TwoDigit = <String>['12', '01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11'];
const List<String> labels00To23 = <String>['00', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23'];
Future<Null> mediaQueryBoilerplate(WidgetTester tester, bool alwaysUse24HourFormat) async {
Future<void> mediaQueryBoilerplate(WidgetTester tester, bool alwaysUse24HourFormat) async {
await tester.pumpWidget(
Localizations(
locale: const Locale('en', 'US'),

View File

@@ -230,7 +230,7 @@ void main() {
DefaultWidgetsLocalizations.delegate,
];
Future<Null> pumpTest(Locale locale) async {
Future<void> pumpTest(Locale locale) async {
await tester.pumpWidget(Localizations(
locale: locale,
delegates: delegates,