Add missing trailing commas (#28673)

* add trailing commas on list/map/parameters

* add trailing commas on Invocation with nb of arg>1

* add commas for widget containing widgets

* add trailing commas if instantiation contains trailing comma

* revert bad change
This commit is contained in:
Alexandre Ardhuin
2019-03-01 08:17:55 +01:00
committed by GitHub
parent 046f960ae2
commit 387f885481
626 changed files with 5183 additions and 5183 deletions

View File

@@ -229,7 +229,7 @@ Future<void> _pumpBoilerplate(
WidgetTester tester,
Widget child, {
Locale locale = const Locale('en', 'US'),
TextDirection textDirection = TextDirection.ltr
TextDirection textDirection = TextDirection.ltr,
}) async {
await tester.pumpWidget(Directionality(
textDirection: TextDirection.ltr,

View File

@@ -29,7 +29,7 @@ class FooMaterialLocalizations extends MaterialLocalizationEn {
class FooMaterialLocalizationsDelegate extends LocalizationsDelegate<MaterialLocalizations> {
const FooMaterialLocalizationsDelegate({
this.supportedLanguage = 'en',
this.backButtonTooltip = 'foo'
this.backButtonTooltip = 'foo',
});
final String supportedLanguage;
@@ -121,7 +121,7 @@ void main() {
},
),
);
}
},
);
}
@@ -153,7 +153,7 @@ void main() {
},
),
);
}
},
);
}
@@ -186,7 +186,7 @@ void main() {
MaterialLocalizations.of(context).backButtonTooltip,
key: textKey,
);
}
},
)
);
@@ -217,7 +217,7 @@ void main() {
MaterialLocalizations.of(context).backButtonTooltip,
key: textKey,
);
}
},
)
);
@@ -246,7 +246,7 @@ void main() {
MaterialLocalizations.of(context).backButtonTooltip,
key: textKey,
);
}
},
)
);

View File

@@ -28,14 +28,14 @@ class _TimePickerLauncher extends StatelessWidget {
onPressed: () async {
onChanged(await showTimePicker(
context: context,
initialTime: const TimeOfDay(hour: 7, minute: 0)
initialTime: const TimeOfDay(hour: 7, minute: 0),
));
}
},
);
}
)
)
)
),
),
),
);
}
}

View File

@@ -260,7 +260,7 @@ void main() {
],
buildContent: (BuildContext context) {
return Text(TestLocalizations.of(context).message);
}
},
)
);
await tester.pump(const Duration(milliseconds: 50)); // TestLocalizations.loadAsync() takes 100ms
@@ -300,7 +300,7 @@ void main() {
Text('B: ${MoreLocalizations.of(context).message}'),
],
);
}
},
)
);
@@ -324,7 +324,7 @@ void main() {
Text('B: ${MoreLocalizations.of(context).message}'),
],
);
}
},
)
);
@@ -365,7 +365,7 @@ void main() {
),
],
);
}
},
)
);
@@ -392,7 +392,7 @@ void main() {
Text('B: ${MoreLocalizations.of(context).message}'),
],
);
}
},
)
);
@@ -417,7 +417,7 @@ void main() {
Text('B: ${MoreLocalizations.of(context).message}'),
],
);
}
},
)
);
@@ -443,7 +443,7 @@ void main() {
Text('B: ${MoreLocalizations.of(context).message}'),
],
);
}
},
)
);
@@ -466,7 +466,7 @@ void main() {
Text('B: ${MoreLocalizations.of(context).message}'),
],
);
}
},
)
);
@@ -491,7 +491,7 @@ void main() {
buildContent: (BuildContext context) {
pageContext = context;
return const Text('Hello World');
}
},
)
);
@@ -512,7 +512,7 @@ void main() {
},
buildContent: (BuildContext context) {
return Text(Localizations.localeOf(context).toString());
}
},
)
);
@@ -535,7 +535,7 @@ void main() {
],
buildContent: (BuildContext context) {
return Text(Localizations.localeOf(context).toString());
}
},
)
);
@@ -577,7 +577,7 @@ void main() {
},
),
);
}
},
)
);
@@ -618,7 +618,7 @@ void main() {
},
),
);
}
},
)
);
@@ -651,7 +651,7 @@ void main() {
final Locale locale = Localizations.localeOf(context);
final TextDirection direction = WidgetsLocalizations.of(context).textDirection;
return Text('$locale $direction');
}
},
)
);
@@ -688,7 +688,7 @@ void main() {
final Locale locale1 = ui.window.locales.first;
final Locale locale2 = ui.window.locales[1];
return Text('$locale1 $locale2');
}
},
)
);
// Initial WidgetTester default locales is `en_US` and `zh_CN`.
@@ -707,7 +707,7 @@ void main() {
locale: const Locale('en', 'US'),
buildContent: (BuildContext context) {
return Text(Localizations.localeOf(context).toString());
}
},
)
);
await tester.pumpAndSettle();
@@ -723,7 +723,7 @@ void main() {
locale: const Locale('en', 'US'),
buildContent: (BuildContext context) {
return Text(Localizations.localeOf(context).toString());
}
},
)
);
await tester.pumpAndSettle();
@@ -739,7 +739,7 @@ void main() {
locale: const Locale('ab', 'CD'),
buildContent: (BuildContext context) {
return Text(Localizations.localeOf(context).toString());
}
},
)
);
await tester.pumpAndSettle();
@@ -758,7 +758,7 @@ void main() {
buildContent: (BuildContext context) {
final Locale locale = Localizations.localeOf(context);
return Text('$locale');
}
},
)
);
await tester.binding.setLocales(const <Locale>[
@@ -781,7 +781,7 @@ void main() {
buildContent: (BuildContext context) {
final Locale locale = Localizations.localeOf(context);
return Text('$locale');
}
},
)
);
await tester.binding.setLocales(const <Locale>[
@@ -813,7 +813,7 @@ void main() {
buildContent: (BuildContext context) {
final Locale locale = Localizations.localeOf(context);
return Text('$locale');
}
},
)
);
@@ -954,7 +954,7 @@ void main() {
buildContent: (BuildContext context) {
final Locale locale = Localizations.localeOf(context);
return Text('$locale');
}
},
)
);
@@ -1094,7 +1094,7 @@ void main() {
buildContent: (BuildContext context) {
final Locale locale = Localizations.localeOf(context);
return Text('$locale');
}
},
)
);
await tester.binding.setLocales(const <Locale>[
@@ -1117,7 +1117,7 @@ void main() {
buildContent: (BuildContext context) {
final Locale locale = Localizations.localeOf(context);
return Text('$locale');
}
},
)
);
await tester.binding.setLocales(const <Locale>[
@@ -1150,7 +1150,7 @@ void main() {
buildContent: (BuildContext context) {
final Locale locale = Localizations.localeOf(context);
return Text('$locale');
}
},
)
);
await tester.binding.setLocales(const <Locale>[
@@ -1217,7 +1217,7 @@ void main() {
buildContent: (BuildContext context) {
final Locale locale = Localizations.localeOf(context);
return Text('$locale');
}
},
)
);
@@ -1281,7 +1281,7 @@ void main() {
buildContent: (BuildContext context) {
final Locale locale = Localizations.localeOf(context);
return Text('$locale');
}
},
)
);
@@ -1433,7 +1433,7 @@ void main() {
buildContent: (BuildContext context) {
final Locale locale = Localizations.localeOf(context);
return Text('$locale');
}
},
)
);