Use curly_braces_in_flow_control_structures for non-flutter packages (#104629)

* Use `curly_braces_in_flow_control_structures` for `packages/flutter_driver`

* Use `curly_braces_in_flow_control_structures` for `packages/flutter_goldens`

* Use `curly_braces_in_flow_control_structures` for `packages/flutter_goldens_client`

* Use `curly_braces_in_flow_control_structures` for `packages/flutter_localizations`

* Use `curly_braces_in_flow_control_structures` for `packages/flutter_test`

* Use `curly_braces_in_flow_control_structures` for `packages/flutter_web_plugins`

* fix comments

* Use `curly_braces_in_flow_control_structures` for `packages/integration_test`

* fix indentation
This commit is contained in:
Pierre-Louis
2022-05-25 20:01:11 +02:00
committed by GitHub
parent a0248ebdf2
commit 74cfc3db67
34 changed files with 478 additions and 245 deletions

View File

@@ -436,8 +436,9 @@ abstract class GlobalMaterialLocalizations implements MaterialLocalizations {
@override
TimeOfDayFormat timeOfDayFormat({ bool alwaysUse24HourFormat = false }) {
assert(alwaysUse24HourFormat != null);
if (alwaysUse24HourFormat)
if (alwaysUse24HourFormat) {
return _get24HourVersionOf(timeOfDayFormatRaw);
}
return timeOfDayFormatRaw;
}

View File

@@ -7,8 +7,9 @@ void encodeBundleTranslations(Map<String, dynamic> bundle) {
for (final String key in bundle.keys) {
// The ARB file resource "attributes" for foo are called @foo. Don't need
// to encode them.
if (key.startsWith('@'))
if (key.startsWith('@')) {
continue;
}
final String translation = bundle[key] as String;
// Rewrite the string as a series of unicode characters in JSON format.
// Like "\u0012\u0123\u1234".

View File

@@ -1428,8 +1428,9 @@ void main() {
Locale('de', 'DE'),
],
localeResolutionCallback: (Locale? locale, Iterable<Locale> supportedLocales) {
if (locale == null)
if (locale == null) {
return const Locale('und', 'US');
}
return const Locale('en', 'US');
},
buildContent: (BuildContext context) {