@@ -1409,8 +1409,9 @@ class _WidgetsAppState extends State<WidgetsApp> with WidgetsBindingObserver {
14091409 assert (route != null , 'The pageRouteBuilder for WidgetsApp must return a valid non-null Route.' );
14101410 return route;
14111411 }
1412- if (widget.onGenerateRoute != null )
1412+ if (widget.onGenerateRoute != null ) {
14131413 return widget.onGenerateRoute !(settings);
1414+ }
14141415 return null ;
14151416 }
14161417
@@ -1454,12 +1455,14 @@ class _WidgetsAppState extends State<WidgetsApp> with WidgetsBindingObserver {
14541455 assert (mounted);
14551456 // The back button dispatcher should handle the pop route if we use a
14561457 // router.
1457- if (_usesRouterWithDelegates)
1458+ if (_usesRouterWithDelegates) {
14581459 return false ;
1460+ }
14591461
14601462 final NavigatorState ? navigator = _navigator? .currentState;
1461- if (navigator == null )
1463+ if (navigator == null ) {
14621464 return false ;
1465+ }
14631466 return navigator.maybePop ();
14641467 }
14651468
@@ -1468,12 +1471,14 @@ class _WidgetsAppState extends State<WidgetsApp> with WidgetsBindingObserver {
14681471 assert (mounted);
14691472 // The route name provider should handle the push route if we uses a
14701473 // router.
1471- if (_usesRouterWithDelegates)
1474+ if (_usesRouterWithDelegates) {
14721475 return false ;
1476+ }
14731477
14741478 final NavigatorState ? navigator = _navigator? .currentState;
1475- if (navigator == null )
1479+ if (navigator == null ) {
14761480 return false ;
1481+ }
14771482 navigator.pushNamed (route);
14781483 return true ;
14791484 }
@@ -1487,17 +1492,19 @@ class _WidgetsAppState extends State<WidgetsApp> with WidgetsBindingObserver {
14871492 // Attempt to use localeListResolutionCallback.
14881493 if (widget.localeListResolutionCallback != null ) {
14891494 final Locale ? locale = widget.localeListResolutionCallback !(preferredLocales, widget.supportedLocales);
1490- if (locale != null )
1495+ if (locale != null ) {
14911496 return locale;
1497+ }
14921498 }
14931499 // localeListResolutionCallback failed, falling back to localeResolutionCallback.
14941500 if (widget.localeResolutionCallback != null ) {
14951501 final Locale ? locale = widget.localeResolutionCallback !(
14961502 preferredLocales != null && preferredLocales.isNotEmpty ? preferredLocales.first : null ,
14971503 widget.supportedLocales,
14981504 );
1499- if (locale != null )
1505+ if (locale != null ) {
15001506 return locale;
1507+ }
15011508 }
15021509 // Both callbacks failed, falling back to default algorithm.
15031510 return basicLocaleListResolution (preferredLocales, supportedLocales);
@@ -1533,13 +1540,16 @@ class _WidgetsAppState extends State<WidgetsApp> with WidgetsBindingObserver {
15331540 final Set <Type > unsupportedTypes =
15341541 _localizationsDelegates.map <Type >((LocalizationsDelegate <dynamic > delegate) => delegate.type).toSet ();
15351542 for (final LocalizationsDelegate <dynamic > delegate in _localizationsDelegates) {
1536- if (! unsupportedTypes.contains (delegate.type))
1543+ if (! unsupportedTypes.contains (delegate.type)) {
15371544 continue ;
1538- if (delegate.isSupported (appLocale))
1545+ }
1546+ if (delegate.isSupported (appLocale)) {
15391547 unsupportedTypes.remove (delegate.type);
1548+ }
15401549 }
1541- if (unsupportedTypes.isEmpty)
1550+ if (unsupportedTypes.isEmpty) {
15421551 return true ;
1552+ }
15431553
15441554 FlutterError .reportError (FlutterErrorDetails (
15451555 exception: "Warning: This application's locale, $appLocale , is not supported by all of its localization delegates." ,
0 commit comments