diff --git a/dev/integration_tests/external_ui/lib/main.dart b/dev/integration_tests/external_ui/lib/main.dart index 398500f4ae..287e2fa9ea 100644 --- a/dev/integration_tests/external_ui/lib/main.dart +++ b/dev/integration_tests/external_ui/lib/main.dart @@ -153,11 +153,11 @@ Press play to produce texture frames.'''; ], ), ), - floatingActionButton: (_icon == null ? null : new FloatingActionButton( + floatingActionButton: _icon == null ? null : new FloatingActionButton( key: const ValueKey('fab'), child: new Icon(_icon), onPressed: _nextState, - )), + ), ), ); } diff --git a/examples/flutter_gallery/lib/demo/video_demo.dart b/examples/flutter_gallery/lib/demo/video_demo.dart index 27c1739ce7..b82c2c8f43 100644 --- a/examples/flutter_gallery/lib/demo/video_demo.dart +++ b/examples/flutter_gallery/lib/demo/video_demo.dart @@ -399,7 +399,7 @@ class _VideoDemoState extends State appBar: new AppBar( title: const Text('Videos'), ), - body: (isSupported) + body: isSupported ? new ConnectivityOverlay( child: new ListView( children: [ diff --git a/examples/layers/widgets/gestures.dart b/examples/layers/widgets/gestures.dart index af54123e30..deb7426899 100644 --- a/examples/layers/widgets/gestures.dart +++ b/examples/layers/widgets/gestures.dart @@ -109,7 +109,7 @@ class GestureDemoState extends State { void _handleScaleUpdate(ScaleUpdateDetails details) { setState(() { - _zoom = (_previousZoom * details.scale); + _zoom = _previousZoom * details.scale; // Ensure that item under the focal point stays in the same place despite zooming final Offset normalizedOffset = (_startingFocalPoint - _previousOffset) / _previousZoom; diff --git a/packages/flutter/lib/src/material/flexible_space_bar.dart b/packages/flutter/lib/src/material/flexible_space_bar.dart index e375894cf7..96e2ca303d 100644 --- a/packages/flutter/lib/src/material/flexible_space_bar.dart +++ b/packages/flutter/lib/src/material/flexible_space_bar.dart @@ -117,7 +117,7 @@ class _FlexibleSpaceBarState extends State { // 0.0 -> Expanded // 1.0 -> Collapsed to toolbar - final double t = (1.0 - (settings.currentExtent - settings.minExtent) / (deltaExtent)).clamp(0.0, 1.0); + final double t = (1.0 - (settings.currentExtent - settings.minExtent) / deltaExtent).clamp(0.0, 1.0); // background image if (widget.background != null) { diff --git a/packages/flutter/lib/src/painting/colors.dart b/packages/flutter/lib/src/painting/colors.dart index 64def58b3f..c24bd9ef79 100644 --- a/packages/flutter/lib/src/painting/colors.dart +++ b/packages/flutter/lib/src/painting/colors.dart @@ -225,7 +225,7 @@ class ColorSwatch extends Color { if (other.runtimeType != runtimeType) return false; final ColorSwatch typedOther = other; - return super==(other) && _swatch == typedOther._swatch; + return super == other && _swatch == typedOther._swatch; } @override diff --git a/packages/flutter/test/material/list_tile_test.dart b/packages/flutter/test/material/list_tile_test.dart index f3e1773a23..a0dcf599c0 100644 --- a/packages/flutter/test/material/list_tile_test.dart +++ b/packages/flutter/test/material/list_tile_test.dart @@ -285,16 +285,16 @@ void main() { Color textColor(Key key) => tester.state(find.byKey(key)).textStyle.color; // A selected ListTile's leading, trailing, and text get the primary color by default - await(tester.pumpWidget(buildFrame(selected: true))); - await(tester.pump(const Duration(milliseconds: 300))); // DefaultTextStyle changes animate + await tester.pumpWidget(buildFrame(selected: true)); + await tester.pump(const Duration(milliseconds: 300)); // DefaultTextStyle changes animate expect(iconColor(leadingKey), theme.primaryColor); expect(iconColor(trailingKey), theme.primaryColor); expect(textColor(titleKey), theme.primaryColor); expect(textColor(subtitleKey), theme.primaryColor); // A selected ListTile's leading, trailing, and text get the ListTileTheme's selectedColor - await(tester.pumpWidget(buildFrame(selected: true, selectedColor: green))); - await(tester.pump(const Duration(milliseconds: 300))); // DefaultTextStyle changes animate + await tester.pumpWidget(buildFrame(selected: true, selectedColor: green)); + await tester.pump(const Duration(milliseconds: 300)); // DefaultTextStyle changes animate expect(iconColor(leadingKey), green); expect(iconColor(trailingKey), green); expect(textColor(titleKey), green); @@ -302,16 +302,16 @@ void main() { // An unselected ListTile's leading and trailing get the ListTileTheme's iconColor // An unselected ListTile's title texts get the ListTileTheme's textColor - await(tester.pumpWidget(buildFrame(iconColor: red, textColor: green))); - await(tester.pump(const Duration(milliseconds: 300))); // DefaultTextStyle changes animate + await tester.pumpWidget(buildFrame(iconColor: red, textColor: green)); + await tester.pump(const Duration(milliseconds: 300)); // DefaultTextStyle changes animate expect(iconColor(leadingKey), red); expect(iconColor(trailingKey), red); expect(textColor(titleKey), green); expect(textColor(subtitleKey), green); // If the item is disabled it's rendered with the theme's disabled color. - await(tester.pumpWidget(buildFrame(enabled: false))); - await(tester.pump(const Duration(milliseconds: 300))); // DefaultTextStyle changes animate + await tester.pumpWidget(buildFrame(enabled: false)); + await tester.pump(const Duration(milliseconds: 300)); // DefaultTextStyle changes animate expect(iconColor(leadingKey), theme.disabledColor); expect(iconColor(trailingKey), theme.disabledColor); expect(textColor(titleKey), theme.disabledColor); @@ -319,8 +319,8 @@ void main() { // If the item is disabled it's rendered with the theme's disabled color. // Even if it's selected. - await(tester.pumpWidget(buildFrame(enabled: false, selected: true))); - await(tester.pump(const Duration(milliseconds: 300))); // DefaultTextStyle changes animate + await tester.pumpWidget(buildFrame(enabled: false, selected: true)); + await tester.pump(const Duration(milliseconds: 300)); // DefaultTextStyle changes animate expect(iconColor(leadingKey), theme.disabledColor); expect(iconColor(trailingKey), theme.disabledColor); expect(textColor(titleKey), theme.disabledColor); diff --git a/packages/flutter/test/material/tabs_test.dart b/packages/flutter/test/material/tabs_test.dart index ae03a01c5b..a2429fc59f 100644 --- a/packages/flutter/test/material/tabs_test.dart +++ b/packages/flutter/test/material/tabs_test.dart @@ -1332,11 +1332,11 @@ void main() { // A fling in the TabBar or TabBarView, shouldn't do anything. - await(tester.fling(find.byType(TabBar), const Offset(-100.0, 0.0), 5000.0)); - await(tester.pumpAndSettle()); + await tester.fling(find.byType(TabBar), const Offset(-100.0, 0.0), 5000.0); + await tester.pumpAndSettle(); - await(tester.fling(find.byType(TabBarView), const Offset(100.0, 0.0), 5000.0)); - await(tester.pumpAndSettle()); + await tester.fling(find.byType(TabBarView), const Offset(100.0, 0.0), 5000.0); + await tester.pumpAndSettle(); expect(controller.index, 0); }); @@ -1378,17 +1378,17 @@ void main() { // A fling in the TabBar or TabBarView, shouldn't move the tab. - await(tester.fling(find.byType(TabBar), const Offset(-100.0, 0.0), 5000.0)); - await(tester.pump(const Duration(milliseconds: 50))); + await tester.fling(find.byType(TabBar), const Offset(-100.0, 0.0), 5000.0); + await tester.pump(const Duration(milliseconds: 50)); expect(tester.getTopLeft(find.widgetWithText(Tab, 'TAB')).dx, 0); expect(tester.getTopRight(find.widgetWithText(Tab, 'TAB')).dx, 800); - await(tester.pumpAndSettle()); + await tester.pumpAndSettle(); - await(tester.fling(find.byType(TabBarView), const Offset(100.0, 0.0), 5000.0)); - await(tester.pump(const Duration(milliseconds: 50))); + await tester.fling(find.byType(TabBarView), const Offset(100.0, 0.0), 5000.0); + await tester.pump(const Duration(milliseconds: 50)); expect(tester.getTopLeft(find.widgetWithText(Tab, 'TAB')).dx, 0); expect(tester.getTopRight(find.widgetWithText(Tab, 'TAB')).dx, 800); - await(tester.pumpAndSettle()); + await tester.pumpAndSettle(); expect(controller.index, 0); expect(find.text('TAB'), findsOneWidget); diff --git a/packages/flutter/test/widgets/heroes_test.dart b/packages/flutter/test/widgets/heroes_test.dart index 248bc489dc..52105e975a 100644 --- a/packages/flutter/test/widgets/heroes_test.dart +++ b/packages/flutter/test/widgets/heroes_test.dart @@ -758,7 +758,7 @@ void main() { // Scroll the target upwards by 25 pixels. The Hero flight's Y coordinate // will be redirected from 100 to 75. - await(tester.drag(find.byKey(routeContainerKey), const Offset(0.0, -25.0))); + await tester.drag(find.byKey(routeContainerKey), const Offset(0.0, -25.0)); await tester.pump(); await tester.pump(const Duration(milliseconds: 10)); final double yAt110ms = tester.getTopLeft(find.byKey(routeHeroKey)).dy; @@ -833,7 +833,7 @@ void main() { expect(yAt100ms, lessThan(200.0)); expect(yAt100ms, greaterThan(100.0)); - await(tester.drag(find.byKey(routeContainerKey), const Offset(0.0, -400.0))); + await tester.drag(find.byKey(routeContainerKey), const Offset(0.0, -400.0)); await tester.pump(); await tester.pump(const Duration(milliseconds: 10)); expect(find.byKey(routeContainerKey), findsNothing); // Scrolled off the top diff --git a/packages/flutter/test/widgets/nested_scroll_view_test.dart b/packages/flutter/test/widgets/nested_scroll_view_test.dart index 23eb123778..4b07098561 100644 --- a/packages/flutter/test/widgets/nested_scroll_view_test.dart +++ b/packages/flutter/test/widgets/nested_scroll_view_test.dart @@ -229,7 +229,7 @@ void main() { // Fully expand the appbar by scrolling (no animation) to 0.0. controller.jumpTo(0.0); - await(tester.pumpAndSettle()); + await tester.pumpAndSettle(); expect(scrollOffset, 0.0); expect(tester.renderObject(find.byType(AppBar)).size.height, 200.0); @@ -291,12 +291,12 @@ void main() { // A scroll collapses Page0's appbar to 150.0. controller.jumpTo(50.0); - await(tester.pumpAndSettle()); + await tester.pumpAndSettle(); expect(tester.renderObject(find.byType(AppBar)).size.height, 150.0); // Fling to Page1. Page1's appbar height is the same as the appbar for Page0. await tester.fling(find.text('Page0'), const Offset(-100.0, 0.0), 10000.0); - await(tester.pumpAndSettle()); + await tester.pumpAndSettle(); expect(find.text('Page0'), findsNothing); expect(find.text('Page1'), findsOneWidget); expect(find.text('Page2'), findsNothing); @@ -305,10 +305,10 @@ void main() { // Expand Page1's appbar and then fling to Page2. Page2's appbar appears // fully expanded. controller.jumpTo(0.0); - await(tester.pumpAndSettle()); + await tester.pumpAndSettle(); expect(tester.renderObject(find.byType(AppBar)).size.height, 200.0); await tester.fling(find.text('Page1'), const Offset(-100.0, 0.0), 10000.0); - await(tester.pumpAndSettle()); + await tester.pumpAndSettle(); expect(find.text('Page0'), findsNothing); expect(find.text('Page1'), findsNothing); expect(find.text('Page2'), findsOneWidget); diff --git a/packages/flutter/test/widgets/tracking_scroll_controller_test.dart b/packages/flutter/test/widgets/tracking_scroll_controller_test.dart index 451e0fafd2..7303dba620 100644 --- a/packages/flutter/test/widgets/tracking_scroll_controller_test.dart +++ b/packages/flutter/test/widgets/tracking_scroll_controller_test.dart @@ -37,10 +37,10 @@ void main() { expect(find.text('Page2-Item1'), findsNothing); controller.jumpTo(listItemHeight + 10); - await (tester.pumpAndSettle()); + await tester.pumpAndSettle(); await tester.fling(find.text('Page0-Item1'), const Offset(-100.0, 0.0), 10000.0); - await (tester.pumpAndSettle()); + await tester.pumpAndSettle(); expect(find.text('Page0-Item1'), findsNothing); expect(find.text('Page1-Item1'), findsOneWidget); @@ -48,7 +48,7 @@ void main() { expect(find.text('Page2-Item1'), findsNothing); await tester.fling(find.text('Page1-Item1'), const Offset(-100.0, 0.0), 10000.0); - await (tester.pumpAndSettle()); + await tester.pumpAndSettle(); expect(find.text('Page0-Item1'), findsNothing); expect(find.text('Page1-Item1'), findsNothing); diff --git a/packages/flutter_tools/lib/src/ios/mac.dart b/packages/flutter_tools/lib/src/ios/mac.dart index 7044ef3fbb..32d37b1b16 100644 --- a/packages/flutter_tools/lib/src/ios/mac.dart +++ b/packages/flutter_tools/lib/src/ios/mac.dart @@ -274,8 +274,8 @@ Future buildXcodeProject({ appIosDir: appDirectory, iosEngineDir: flutterFrameworkDir(buildInfo.mode), isSwift: app.isSwift, - pluginOrFlutterPodChanged: (injectPluginsResult.hasChanged - || previousGeneratedXcconfig != currentGeneratedXcconfig), + pluginOrFlutterPodChanged: injectPluginsResult.hasChanged + || previousGeneratedXcconfig != currentGeneratedXcconfig, ); }