diff --git a/examples/flutter_gallery/lib/demo/cupertino/cupertino_picker_demo.dart b/examples/flutter_gallery/lib/demo/cupertino/cupertino_picker_demo.dart index a01315ee86..0fcaa322f1 100644 --- a/examples/flutter_gallery/lib/demo/cupertino/cupertino_picker_demo.dart +++ b/examples/flutter_gallery/lib/demo/cupertino/cupertino_picker_demo.dart @@ -67,7 +67,7 @@ class _CupertinoPickerDemoState extends State { ), child: GestureDetector( // Blocks taps from propagating to the modal sheet and popping. - onTap: () {}, + onTap: () { }, child: SafeArea( top: false, child: picker, diff --git a/examples/flutter_gallery/lib/demo/material/bottom_app_bar_demo.dart b/examples/flutter_gallery/lib/demo/material/bottom_app_bar_demo.dart index 71d89bcce3..7f2d8250b3 100644 --- a/examples/flutter_gallery/lib/demo/material/bottom_app_bar_demo.dart +++ b/examples/flutter_gallery/lib/demo/material/bottom_app_bar_demo.dart @@ -513,7 +513,7 @@ class _DiamondBorder extends ShapeBorder { } @override - void paint(Canvas canvas, Rect rect, { TextDirection textDirection }) {} + void paint(Canvas canvas, Rect rect, { TextDirection textDirection }) { } // This border doesn't support scaling. @override diff --git a/examples/flutter_gallery/lib/demo/material/search_demo.dart b/examples/flutter_gallery/lib/demo/material/search_demo.dart index 5987a25696..d497bdd7d7 100644 --- a/examples/flutter_gallery/lib/demo/material/search_demo.dart +++ b/examples/flutter_gallery/lib/demo/material/search_demo.dart @@ -60,7 +60,7 @@ class _SearchDemoState extends State { ? Icons.more_horiz : Icons.more_vert, ), - onPressed: () {}, + onPressed: () { }, ), ], ), diff --git a/examples/flutter_gallery/lib/demo/pesto_demo.dart b/examples/flutter_gallery/lib/demo/pesto_demo.dart index 67b271eba1..2890c5b9e0 100644 --- a/examples/flutter_gallery/lib/demo/pesto_demo.dart +++ b/examples/flutter_gallery/lib/demo/pesto_demo.dart @@ -361,7 +361,7 @@ class _RecipePageState extends State { backgroundColor: Colors.transparent, actions: [ PopupMenuButton( - onSelected: (String item) {}, + onSelected: (String item) { }, itemBuilder: (BuildContext context) => >[ _buildMenuItem(Icons.share, 'Tweet recipe'), _buildMenuItem(Icons.email, 'Email recipe'), diff --git a/examples/flutter_gallery/lib/demo/shrine/supplemental/cut_corners_border.dart b/examples/flutter_gallery/lib/demo/shrine/supplemental/cut_corners_border.dart index 687685bfd4..96e7e0e4c9 100644 --- a/examples/flutter_gallery/lib/demo/shrine/supplemental/cut_corners_border.dart +++ b/examples/flutter_gallery/lib/demo/shrine/supplemental/cut_corners_border.dart @@ -118,18 +118,16 @@ class CutCornersBorder extends OutlineInputBorder { } else { final double extent = lerpDouble(0.0, gapExtent + gapPadding * 2.0, gapPercentage); switch (textDirection) { - case TextDirection.rtl: - { - final Path path = _notchedCornerPath(outer.middleRect, gapStart + gapPadding - extent, extent); - canvas.drawPath(path, paint); - break; - } - case TextDirection.ltr: - { - final Path path = _notchedCornerPath(outer.middleRect, gapStart - gapPadding, extent); - canvas.drawPath(path, paint); - break; - } + case TextDirection.rtl: { + final Path path = _notchedCornerPath(outer.middleRect, gapStart + gapPadding - extent, extent); + canvas.drawPath(path, paint); + break; + } + case TextDirection.ltr: { + final Path path = _notchedCornerPath(outer.middleRect, gapStart - gapPadding, extent); + canvas.drawPath(path, paint); + break; + } } } } diff --git a/examples/flutter_gallery/lib/demo/video_demo.dart b/examples/flutter_gallery/lib/demo/video_demo.dart index 6b36faaa2f..2c71c07db6 100644 --- a/examples/flutter_gallery/lib/demo/video_demo.dart +++ b/examples/flutter_gallery/lib/demo/video_demo.dart @@ -144,7 +144,7 @@ class _VideoPlayPauseState extends State { _VideoPlayPauseState() { listener = () { if (mounted) - setState(() {}); + setState(() { }); }; } @@ -221,7 +221,7 @@ class _FadeAnimationState extends State with SingleTickerProvider ); animationController.addListener(() { if (mounted) { - setState(() {}); + setState(() { }); } }); animationController.forward(from: 0.0); @@ -372,7 +372,7 @@ class _VideoDemoState extends State with SingleTickerProviderStateMix await controller.initialize(); if (mounted) { print('< VideoDemo initController "$name" done ${isDisposed ? "DISPOSED" : ""}'); - setState(() {}); + setState(() { }); } } diff --git a/examples/flutter_gallery/test/accessibility_test.dart b/examples/flutter_gallery/test/accessibility_test.dart index 927e6a8263..ad9ef2e5ca 100644 --- a/examples/flutter_gallery/test/accessibility_test.dart +++ b/examples/flutter_gallery/test/accessibility_test.dart @@ -631,13 +631,13 @@ void main() { handle.dispose(); }); - testWidgets('overscroll_demo', (WidgetTester tester) async { - tester.binding.addTime(const Duration(seconds: 3)); - final SemanticsHandle handle = tester.ensureSemantics(); - await tester.pumpWidget(const MaterialApp(home: OverscrollDemo())); - await expectLater(tester, meetsGuideline(textContrastGuideline)); - handle.dispose(); - }); + testWidgets('overscroll_demo', (WidgetTester tester) async { + tester.binding.addTime(const Duration(seconds: 3)); + final SemanticsHandle handle = tester.ensureSemantics(); + await tester.pumpWidget(const MaterialApp(home: OverscrollDemo())); + await expectLater(tester, meetsGuideline(textContrastGuideline)); + handle.dispose(); + }); testWidgets('page_selector_demo $themeName', (WidgetTester tester) async { tester.binding.addTime(const Duration(seconds: 3)); diff --git a/examples/stocks/lib/stock_data.dart b/examples/stocks/lib/stock_data.dart index 3e084824f0..dc94c5108d 100644 --- a/examples/stocks/lib/stock_data.dart +++ b/examples/stocks/lib/stock_data.dart @@ -24,7 +24,7 @@ class Stock { lastSale = 0.0; try { lastSale = double.parse(fields[2]); - } catch (_) {} + } catch (_) { } symbol = fields[0]; name = fields[1]; marketCap = fields[4]; diff --git a/packages/flutter/lib/src/cupertino/refresh.dart b/packages/flutter/lib/src/cupertino/refresh.dart index d5721a37c6..30c712aa4f 100644 --- a/packages/flutter/lib/src/cupertino/refresh.dart +++ b/packages/flutter/lib/src/cupertino/refresh.dart @@ -175,7 +175,7 @@ class _RenderCupertinoSliverRefresh extends RenderSliver // Nothing special done here because this sliver always paints its child // exactly between paintOrigin and paintExtent. @override - void applyPaintTransform(RenderObject child, Matrix4 transform) {} + void applyPaintTransform(RenderObject child, Matrix4 transform) { } } /// The current state of the refresh control. @@ -427,7 +427,7 @@ class _CupertinoSliverRefreshControlState extends State hasSliverLayoutExtent = false); } else { - SchedulerBinding.instance.addPostFrameCallback((Duration timestamp){ + SchedulerBinding.instance.addPostFrameCallback((Duration timestamp) { setState(() => hasSliverLayoutExtent = false); }); } diff --git a/packages/flutter/lib/src/cupertino/switch.dart b/packages/flutter/lib/src/cupertino/switch.dart index 82ee261bac..9ba6a6b4d0 100644 --- a/packages/flutter/lib/src/cupertino/switch.dart +++ b/packages/flutter/lib/src/cupertino/switch.dart @@ -414,7 +414,7 @@ class _RenderCupertinoSwitch extends RenderConstrainedBox { _reactionController.reverse(); } - void _emitVibration(){ + void _emitVibration() { switch(defaultTargetPlatform) { case TargetPlatform.iOS: HapticFeedback.lightImpact(); diff --git a/packages/flutter/lib/src/gestures/eager.dart b/packages/flutter/lib/src/gestures/eager.dart index ef5070993f..ec1f2954e6 100644 --- a/packages/flutter/lib/src/gestures/eager.dart +++ b/packages/flutter/lib/src/gestures/eager.dart @@ -29,8 +29,8 @@ class EagerGestureRecognizer extends OneSequenceGestureRecognizer { String get debugDescription => 'eager'; @override - void didStopTrackingLastPointer(int pointer) {} + void didStopTrackingLastPointer(int pointer) { } @override - void handleEvent(PointerEvent event) {} + void handleEvent(PointerEvent event) { } } diff --git a/packages/flutter/lib/src/gestures/multitap.dart b/packages/flutter/lib/src/gestures/multitap.dart index 4fc01c6513..57e5a5eed1 100644 --- a/packages/flutter/lib/src/gestures/multitap.dart +++ b/packages/flutter/lib/src/gestures/multitap.dart @@ -36,7 +36,7 @@ typedef GestureMultiTapCancelCallback = void Function(int pointer); /// CountdownZoned tracks whether the specified duration has elapsed since /// creation, honoring [Zone]. class _CountdownZoned { - _CountdownZoned({ @required Duration duration }) + _CountdownZoned({ @required Duration duration }) : assert(duration != null) { _timer = Timer(duration, _onTimeout); } diff --git a/packages/flutter/lib/src/material/expansion_panel.dart b/packages/flutter/lib/src/material/expansion_panel.dart index e3cd7d837c..8b622978fe 100644 --- a/packages/flutter/lib/src/material/expansion_panel.dart +++ b/packages/flutter/lib/src/material/expansion_panel.dart @@ -240,7 +240,7 @@ class _ExpansionPanelListState extends State { } _currentOpenPanel = isExpanded ? null : pressedChild; } - setState((){}); + setState(() { }); } @override diff --git a/packages/flutter/lib/src/material/ink_ripple.dart b/packages/flutter/lib/src/material/ink_ripple.dart index 457eaf4762..e672992a03 100644 --- a/packages/flutter/lib/src/material/ink_ripple.dart +++ b/packages/flutter/lib/src/material/ink_ripple.dart @@ -128,8 +128,7 @@ class InkRipple extends InteractiveInkFeature { _textDirection = textDirection, _targetRadius = radius ?? _getTargetRadius(referenceBox, containedInkWell, rectCallback, position), _clipCallback = _getClipCallback(referenceBox, containedInkWell, rectCallback), - super(controller: controller, referenceBox: referenceBox, color: color, onRemoved: onRemoved) - { + super(controller: controller, referenceBox: referenceBox, color: color, onRemoved: onRemoved) { assert(_borderRadius != null); // Immediately begin fading-in the initial splash. diff --git a/packages/flutter/lib/src/material/input_decorator.dart b/packages/flutter/lib/src/material/input_decorator.dart index 9c0935e279..83f1e12d63 100644 --- a/packages/flutter/lib/src/material/input_decorator.dart +++ b/packages/flutter/lib/src/material/input_decorator.dart @@ -647,7 +647,7 @@ class _RenderDecoration extends RenderBox { } // The returned list is ordered for hit testing. - Iterable get _children sync *{ + Iterable get _children sync* { if (icon != null) yield icon; if (input != null) diff --git a/packages/flutter/lib/src/material/list_tile.dart b/packages/flutter/lib/src/material/list_tile.dart index 94ce0ae717..d57acd7d89 100644 --- a/packages/flutter/lib/src/material/list_tile.dart +++ b/packages/flutter/lib/src/material/list_tile.dart @@ -738,7 +738,7 @@ class _RenderListTile extends RenderBox { } // The returned list is ordered for hit testing. - Iterable get _children sync *{ + Iterable get _children sync* { if (leading != null) yield leading; if (title != null) diff --git a/packages/flutter/lib/src/material/reorderable_list.dart b/packages/flutter/lib/src/material/reorderable_list.dart index dcc4a94fa7..a571dcab52 100644 --- a/packages/flutter/lib/src/material/reorderable_list.dart +++ b/packages/flutter/lib/src/material/reorderable_list.dart @@ -525,8 +525,8 @@ class _ReorderableListContentState extends State<_ReorderableListContent> with T // If the target is not the original starting point, then we will accept the drop. return _dragging == toAccept && toAccept != toWrap.key; }, - onAccept: (Key accepted) {}, - onLeave: (Key leaving) {}, + onAccept: (Key accepted) { }, + onLeave: (Key leaving) { }, ); }); } diff --git a/packages/flutter/lib/src/rendering/layer.dart b/packages/flutter/lib/src/rendering/layer.dart index f5e22df3fb..c51835b396 100644 --- a/packages/flutter/lib/src/rendering/layer.dart +++ b/packages/flutter/lib/src/rendering/layer.dart @@ -58,7 +58,7 @@ abstract class Layer extends AbstractNode with DiagnosticableTreeMixin { /// This is only for debug and test purpose only. @visibleForTesting void debugMarkClean() { - assert((){ + assert(() { _needsAddToScene = false; return true; }()); @@ -77,7 +77,7 @@ abstract class Layer extends AbstractNode with DiagnosticableTreeMixin { @visibleForTesting bool get debugSubtreeNeedsAddToScene { bool result; - assert((){ + assert(() { result = _subtreeNeedsAddToScene; return true; }()); diff --git a/packages/flutter/lib/src/rendering/platform_view.dart b/packages/flutter/lib/src/rendering/platform_view.dart index dfd1f4e5d8..cb545cc188 100644 --- a/packages/flutter/lib/src/rendering/platform_view.dart +++ b/packages/flutter/lib/src/rendering/platform_view.dart @@ -84,8 +84,7 @@ class RenderAndroidView extends RenderBox { }) : assert(viewController != null), assert(hitTestBehavior != null), assert(gestureRecognizers != null), - _viewController = viewController - { + _viewController = viewController { _motionEventsDispatcher = _MotionEventsDispatcher(globalToLocal, viewController); updateGestureRecognizers(gestureRecognizers); } @@ -430,7 +429,7 @@ class _UiKitViewGestureRecognizer extends OneSequenceGestureRecognizer { String get debugDescription => 'UIKit view'; @override - void didStopTrackingLastPointer(int pointer) {} + void didStopTrackingLastPointer(int pointer) { } @override void handleEvent(PointerEvent event) { @@ -501,7 +500,7 @@ class _AndroidViewGestureRecognizer extends OneSequenceGestureRecognizer { String get debugDescription => 'Android view'; @override - void didStopTrackingLastPointer(int pointer) {} + void didStopTrackingLastPointer(int pointer) { } @override void handleEvent(PointerEvent event) { diff --git a/packages/flutter/lib/src/widgets/binding.dart b/packages/flutter/lib/src/widgets/binding.dart index 4c2b11fc4e..128733f344 100644 --- a/packages/flutter/lib/src/widgets/binding.dart +++ b/packages/flutter/lib/src/widgets/binding.dart @@ -242,7 +242,7 @@ abstract class WidgetsBindingObserver { /// features. /// /// This method exposes notifications from [Window.onAccessibilityFeaturesChanged]. - void didChangeAccessibilityFeatures() {} + void didChangeAccessibilityFeatures() { } } /// The glue between the widgets layer and the Flutter engine. diff --git a/packages/flutter/lib/src/widgets/implicit_animations.dart b/packages/flutter/lib/src/widgets/implicit_animations.dart index 815b5df12d..fd71e4d26a 100644 --- a/packages/flutter/lib/src/widgets/implicit_animations.dart +++ b/packages/flutter/lib/src/widgets/implicit_animations.dart @@ -367,7 +367,7 @@ abstract class ImplicitlyAnimatedWidgetState /// Any properties that depend upon tweens created by [forEachTween] should be /// updated within [didUpdateTweens], not within [forEachTween]. @protected - void didUpdateTweens() {} + void didUpdateTweens() { } } /// A base class for widgets with implicit animations that need to rebuild their diff --git a/packages/flutter/lib/src/widgets/sliver.dart b/packages/flutter/lib/src/widgets/sliver.dart index 5c4ece2cd7..cf28841b47 100644 --- a/packages/flutter/lib/src/widgets/sliver.dart +++ b/packages/flutter/lib/src/widgets/sliver.dart @@ -161,7 +161,7 @@ abstract class SliverChildDelegate { /// /// Useful for subclasses that which to track which children are included in /// the underlying render tree. - void didFinishLayout(int firstIndex, int lastIndex) {} + void didFinishLayout(int firstIndex, int lastIndex) { } /// Called whenever a new instance of the child delegate class is /// provided to the sliver. diff --git a/packages/flutter/test/animation/listener_helpers_test.dart b/packages/flutter/test/animation/listener_helpers_test.dart index 28ca70a5ae..f380d359ba 100644 --- a/packages/flutter/test/animation/listener_helpers_test.dart +++ b/packages/flutter/test/animation/listener_helpers_test.dart @@ -9,7 +9,7 @@ import 'package:flutter/widgets.dart'; void main() { test('AnimationLocalStatusListenersMixin with AnimationLazyListenerMixin - removing unregistered listener is no-op', () { final _TestAnimationLocalStatusListeners uut = _TestAnimationLocalStatusListeners(); - final AnimationStatusListener fakeListener = (AnimationStatus status) {}; + final AnimationStatusListener fakeListener = (AnimationStatus status) { }; uut.removeStatusListener(fakeListener); expect(uut.callsToStart, 0); expect(uut.callsToStop, 0); @@ -17,7 +17,7 @@ void main() { test('AnimationLocalListenersMixin with AnimationLazyListenerMixin - removing unregistered listener is no-op', () { final _TestAnimationLocalListeners uut = _TestAnimationLocalListeners(); - final VoidCallback fakeListener = () {}; + final VoidCallback fakeListener = () { }; uut.removeListener(fakeListener); expect(uut.callsToStart, 0); expect(uut.callsToStop, 0); diff --git a/packages/flutter/test/cupertino/action_sheet_test.dart b/packages/flutter/test/cupertino/action_sheet_test.dart index 1e8fb2af5b..0619002143 100644 --- a/packages/flutter/test/cupertino/action_sheet_test.dart +++ b/packages/flutter/test/cupertino/action_sheet_test.dart @@ -54,7 +54,7 @@ void main() { CupertinoActionSheetAction( isDestructiveAction: true, child: const Text('Ok'), - onPressed: () {}, + onPressed: () { }, ), ), ); @@ -70,7 +70,7 @@ void main() { CupertinoActionSheetAction( isDefaultAction: true, child: const Text('Ok'), - onPressed: () {}, + onPressed: () { }, ), ), ); @@ -181,11 +181,11 @@ void main() { actions: [ CupertinoActionSheetAction( child: const Text('One'), - onPressed: () {}, + onPressed: () { }, ), CupertinoActionSheetAction( child: const Text('Two'), - onPressed: () {}, + onPressed: () { }, ), ], actionScrollController: actionScrollController, @@ -228,23 +228,23 @@ void main() { actions: [ CupertinoActionSheetAction( child: const Text('One'), - onPressed: () {}, + onPressed: () { }, ), CupertinoActionSheetAction( child: const Text('Two'), - onPressed: () {}, + onPressed: () { }, ), CupertinoActionSheetAction( child: const Text('Three'), - onPressed: () {}, + onPressed: () { }, ), CupertinoActionSheetAction( child: const Text('Four'), - onPressed: () {}, + onPressed: () { }, ), CupertinoActionSheetAction( child: const Text('Five'), - onPressed: () {}, + onPressed: () { }, ), ], actionScrollController: actionScrollController, @@ -295,11 +295,11 @@ void main() { actions: [ CupertinoActionSheetAction( child: const Text('One'), - onPressed: () {}, + onPressed: () { }, ), CupertinoActionSheetAction( child: const Text('Two'), - onPressed: () {}, + onPressed: () { }, ), ], messageScrollController: messageScrollController, @@ -368,11 +368,11 @@ void main() { actions: [ CupertinoActionSheetAction( child: const Text('One'), - onPressed: () {}, + onPressed: () { }, ), CupertinoActionSheetAction( child: const Text('Two'), - onPressed: () {}, + onPressed: () { }, ), ], ), @@ -396,11 +396,11 @@ void main() { actions: [ CupertinoActionSheetAction( child: const Text('One'), - onPressed: () {}, + onPressed: () { }, ), CupertinoActionSheetAction( child: const Text('Two'), - onPressed: () {}, + onPressed: () { }, ), ], ), @@ -425,12 +425,12 @@ void main() { actions: [ CupertinoActionSheetAction( child: const Text('One'), - onPressed: () {}, + onPressed: () { }, ), ], cancelButton: CupertinoActionSheetAction( child: const Text('Cancel'), - onPressed: () {}, + onPressed: () { }, ), ), ), @@ -452,16 +452,16 @@ void main() { actions: [ CupertinoActionSheetAction( child: const Text('One'), - onPressed: () {}, + onPressed: () { }, ), CupertinoActionSheetAction( child: const Text('Two'), - onPressed: () {}, + onPressed: () { }, ), ], cancelButton: CupertinoActionSheetAction( child: const Text('Cancel'), - onPressed: () {}, + onPressed: () { }, ), ), ), @@ -483,20 +483,20 @@ void main() { actions: [ CupertinoActionSheetAction( child: const Text('One'), - onPressed: () {}, + onPressed: () { }, ), CupertinoActionSheetAction( child: const Text('Two'), - onPressed: () {}, + onPressed: () { }, ), CupertinoActionSheetAction( child: const Text('Three'), - onPressed: () {}, + onPressed: () { }, ), ], cancelButton: CupertinoActionSheetAction( child: const Text('Cancel'), - onPressed: () {}, + onPressed: () { }, ), ), ), @@ -518,24 +518,24 @@ void main() { actions: [ CupertinoActionSheetAction( child: const Text('One'), - onPressed: () {}, + onPressed: () { }, ), CupertinoActionSheetAction( child: const Text('Two'), - onPressed: () {}, + onPressed: () { }, ), CupertinoActionSheetAction( child: const Text('Three'), - onPressed: () {}, + onPressed: () { }, ), CupertinoActionSheetAction( child: const Text('Four'), - onPressed: () {}, + onPressed: () { }, ), ], cancelButton: CupertinoActionSheetAction( child: const Text('Cancel'), - onPressed: () {}, + onPressed: () { }, ), ), ), @@ -557,7 +557,7 @@ void main() { actions: [ CupertinoActionSheetAction( child: const Text('One'), - onPressed: () {}, + onPressed: () { }, ), ], ), @@ -579,11 +579,11 @@ void main() { actions: [ CupertinoActionSheetAction( child: const Text('One'), - onPressed: () {}, + onPressed: () { }, ), CupertinoActionSheetAction( child: const Text('Two'), - onPressed: () {}, + onPressed: () { }, ), ], ), @@ -603,7 +603,7 @@ void main() { CupertinoActionSheet( cancelButton: CupertinoActionSheetAction( child: const Text('Cancel'), - onPressed: (){}, + onPressed: () { }, ), ), ), @@ -661,16 +661,16 @@ void main() { actions: [ CupertinoActionSheetAction( child: const Text('One'), - onPressed: () {}, + onPressed: () { }, ), CupertinoActionSheetAction( child: const Text('Two'), - onPressed: () {}, + onPressed: () { }, ), ], cancelButton: CupertinoActionSheetAction( child: const Text('Cancel'), - onPressed: () {}, + onPressed: () { }, ), ), ), @@ -696,16 +696,16 @@ void main() { actions: [ CupertinoActionSheetAction( child: const Text('One'), - onPressed: () {}, + onPressed: () { }, ), CupertinoActionSheetAction( child: const Text('Two'), - onPressed: () {}, + onPressed: () { }, ), ], cancelButton: CupertinoActionSheetAction( child: const Text('Cancel'), - onPressed: () {}, + onPressed: () { }, ), ), ), @@ -773,16 +773,16 @@ void main() { actions: [ CupertinoActionSheetAction( child: const Text('One'), - onPressed: () {}, + onPressed: () { }, ), CupertinoActionSheetAction( child: const Text('Two'), - onPressed: () {}, + onPressed: () { }, ), ], cancelButton: CupertinoActionSheetAction( child: const Text('Cancel'), - onPressed: () {}, + onPressed: () { }, ), ), ), @@ -833,16 +833,16 @@ void main() { actions: [ CupertinoActionSheetAction( child: const Text('One'), - onPressed: () {}, + onPressed: () { }, ), CupertinoActionSheetAction( child: const Text('Two'), - onPressed: () {}, + onPressed: () { }, ), ], cancelButton: CupertinoActionSheetAction( child: const Text('Cancel'), - onPressed: () {}, + onPressed: () { }, ), ), ), diff --git a/packages/flutter/test/cupertino/button_test.dart b/packages/flutter/test/cupertino/button_test.dart index a15cc205e1..02196b94c9 100644 --- a/packages/flutter/test/cupertino/button_test.dart +++ b/packages/flutter/test/cupertino/button_test.dart @@ -234,7 +234,7 @@ void main() { await tester.pumpWidget( CupertinoApp( home: CupertinoButton( - onPressed: () {}, + onPressed: () { }, child: Builder(builder: (BuildContext context) { textStyle = DefaultTextStyle.of(context).style; return const Placeholder(); @@ -248,7 +248,7 @@ void main() { await tester.pumpWidget( CupertinoApp( home: CupertinoButton.filled( - onPressed: () {}, + onPressed: () { }, child: Builder(builder: (BuildContext context) { textStyle = DefaultTextStyle.of(context).style; return const Placeholder(); @@ -270,7 +270,7 @@ void main() { CupertinoApp( theme: const CupertinoThemeData(brightness: Brightness.dark), home: CupertinoButton( - onPressed: () {}, + onPressed: () { }, child: Builder(builder: (BuildContext context) { textStyle = DefaultTextStyle.of(context).style; return const Placeholder(); @@ -284,7 +284,7 @@ void main() { CupertinoApp( theme: const CupertinoThemeData(brightness: Brightness.dark), home: CupertinoButton.filled( - onPressed: () {}, + onPressed: () { }, child: Builder(builder: (BuildContext context) { textStyle = DefaultTextStyle.of(context).style; return const Placeholder(); diff --git a/packages/flutter/test/cupertino/date_picker_test.dart b/packages/flutter/test/cupertino/date_picker_test.dart index 70aececfb9..37377ec443 100644 --- a/packages/flutter/test/cupertino/date_picker_test.dart +++ b/packages/flutter/test/cupertino/date_picker_test.dart @@ -25,7 +25,7 @@ void main() { expect( () { CupertinoTimerPicker( - onTimerDurationChanged: (_) {}, + onTimerDurationChanged: (_) { }, initialTimerDuration: const Duration(days: 1), ); }, @@ -35,7 +35,7 @@ void main() { expect( () { CupertinoTimerPicker( - onTimerDurationChanged: (_) {}, + onTimerDurationChanged: (_) { }, initialTimerDuration: const Duration(seconds: -1), ); }, @@ -47,7 +47,7 @@ void main() { expect( () { CupertinoTimerPicker( - onTimerDurationChanged: (_) {}, + onTimerDurationChanged: (_) { }, minuteInterval: 0, ); }, @@ -56,7 +56,7 @@ void main() { expect( () { CupertinoTimerPicker( - onTimerDurationChanged: (_) {}, + onTimerDurationChanged: (_) { }, minuteInterval: -1, ); }, @@ -65,7 +65,7 @@ void main() { expect( () { CupertinoTimerPicker( - onTimerDurationChanged: (_) {}, + onTimerDurationChanged: (_) { }, minuteInterval: 7, ); }, @@ -77,7 +77,7 @@ void main() { expect( () { CupertinoTimerPicker( - onTimerDurationChanged: (_) {}, + onTimerDurationChanged: (_) { }, secondInterval: 0, ); }, @@ -86,7 +86,7 @@ void main() { expect( () { CupertinoTimerPicker( - onTimerDurationChanged: (_) {}, + onTimerDurationChanged: (_) { }, secondInterval: -1, ); }, @@ -95,7 +95,7 @@ void main() { expect( () { CupertinoTimerPicker( - onTimerDurationChanged: (_) {}, + onTimerDurationChanged: (_) { }, secondInterval: 7, ); }, @@ -107,7 +107,7 @@ void main() { await tester.pumpWidget( CupertinoApp( home: CupertinoTimerPicker( - onTimerDurationChanged: (_) {}, + onTimerDurationChanged: (_) { }, initialTimerDuration: const Duration(hours: 12, minutes: 30, seconds: 59), ), ), @@ -136,7 +136,7 @@ void main() { home: Directionality( textDirection: TextDirection.rtl, child: CupertinoTimerPicker( - onTimerDurationChanged: (_) {}, + onTimerDurationChanged: (_) { }, initialTimerDuration: const Duration(hours: 12, minutes: 30, seconds: 59), ), ), @@ -167,7 +167,7 @@ void main() { height: 400.0, width: 400.0, child: CupertinoTimerPicker( - onTimerDurationChanged: (_) {}, + onTimerDurationChanged: (_) { }, initialTimerDuration: const Duration(hours: 12, minutes: 30, seconds: 59), ), ), @@ -184,7 +184,7 @@ void main() { height: 400.0, width: 800.0, child: CupertinoTimerPicker( - onTimerDurationChanged: (_) {}, + onTimerDurationChanged: (_) { }, initialTimerDuration: const Duration(hours: 12, minutes: 30, seconds: 59), ), ), @@ -237,7 +237,7 @@ void main() { () { CupertinoDatePicker( mode: null, - onDateTimeChanged: (_) {}, + onDateTimeChanged: (_) { }, initialDateTime: DateTime.now(), ); }, @@ -259,7 +259,7 @@ void main() { testWidgets('initial date is set to default value', (WidgetTester tester) async { final CupertinoDatePicker picker = CupertinoDatePicker( - onDateTimeChanged: (_) {}, + onDateTimeChanged: (_) { }, ); expect(picker.initialDateTime, isNotNull); }); @@ -317,7 +317,7 @@ void main() { width: 400.0, child: CupertinoDatePicker( mode: CupertinoDatePickerMode.date, - onDateTimeChanged: (_) {}, + onDateTimeChanged: (_) { }, initialDateTime: DateTime(2018, 9, 15, 0, 0), ), ), @@ -337,7 +337,7 @@ void main() { width: 400.0, child: CupertinoDatePicker( mode: CupertinoDatePickerMode.dateAndTime, - onDateTimeChanged: (_) {}, + onDateTimeChanged: (_) { }, initialDateTime: DateTime(2018, 9, 15, 3, 14), ), ), @@ -357,7 +357,7 @@ void main() { textDirection: TextDirection.ltr, child: CupertinoDatePicker( mode: CupertinoDatePickerMode.dateAndTime, - onDateTimeChanged: (_) {}, + onDateTimeChanged: (_) { }, initialDateTime: DateTime(2018, 1, 1, 10, 30), ), ), @@ -375,7 +375,7 @@ void main() { width: 800.0, child: CupertinoDatePicker( mode: CupertinoDatePickerMode.dateAndTime, - onDateTimeChanged: (_) {}, + onDateTimeChanged: (_) { }, initialDateTime: DateTime(2018, 1, 1, 10, 30), ), ), @@ -397,7 +397,7 @@ void main() { width: 400.0, child: CupertinoDatePicker( mode: CupertinoDatePickerMode.date, - onDateTimeChanged: (_) {}, + onDateTimeChanged: (_) { }, initialDateTime: DateTime(2018, 1, 1, 10, 30), ), ), @@ -415,7 +415,7 @@ void main() { width: 800.0, child: CupertinoDatePicker( mode: CupertinoDatePickerMode.date, - onDateTimeChanged: (_) {}, + onDateTimeChanged: (_) { }, initialDateTime: DateTime(2018, 1, 1, 10, 30), ), ), @@ -437,7 +437,7 @@ void main() { width: 400.0, child: CupertinoDatePicker( mode: CupertinoDatePickerMode.time, - onDateTimeChanged: (_) {}, + onDateTimeChanged: (_) { }, initialDateTime: DateTime(2018, 1, 1, 10, 30), ), ), @@ -455,7 +455,7 @@ void main() { width: 800.0, child: CupertinoDatePicker( mode: CupertinoDatePickerMode.time, - onDateTimeChanged: (_) {}, + onDateTimeChanged: (_) { }, initialDateTime: DateTime(2018, 1, 1, 10, 30), ), ), diff --git a/packages/flutter/test/cupertino/nav_bar_test.dart b/packages/flutter/test/cupertino/nav_bar_test.dart index 365f132614..4493f78021 100644 --- a/packages/flutter/test/cupertino/nav_bar_test.dart +++ b/packages/flutter/test/cupertino/nav_bar_test.dart @@ -154,12 +154,12 @@ void main() { CupertinoApp( home: CupertinoNavigationBar( leading: CupertinoButton( - onPressed: () {}, + onPressed: () { }, child: const _ExpectStyles(color: CupertinoColors.activeBlue, index: 0x000001), ), middle: const _ExpectStyles(color: CupertinoColors.black, index: 0x000100), trailing: CupertinoButton( - onPressed: () {}, + onPressed: () { }, child: const _ExpectStyles(color: CupertinoColors.activeBlue, index: 0x010000), ), ), @@ -175,12 +175,12 @@ void main() { theme: const CupertinoThemeData(brightness: Brightness.dark), home: CupertinoNavigationBar( leading: CupertinoButton( - onPressed: () {}, + onPressed: () { }, child: const _ExpectStyles(color: CupertinoColors.activeOrange, index: 0x000001), ), middle: const _ExpectStyles(color: CupertinoColors.white, index: 0x000100), trailing: CupertinoButton( - onPressed: () {}, + onPressed: () { }, child: const _ExpectStyles(color: CupertinoColors.activeOrange, index: 0x010000), ), ), @@ -195,12 +195,12 @@ void main() { CupertinoApp( home: CupertinoNavigationBar( leading: CupertinoButton( - onPressed: () {}, + onPressed: () { }, child: const _ExpectStyles(color: Color(0xFF001122), index: 0x000001), ), middle: const _ExpectStyles(color: Color(0xFF000000), index: 0x000100), trailing: CupertinoButton( - onPressed: () {}, + onPressed: () { }, child: const _ExpectStyles(color: Color(0xFF001122), index: 0x010000), ), actionsForegroundColor: const Color(0xFF001122), diff --git a/packages/flutter/test/cupertino/picker_test.dart b/packages/flutter/test/cupertino/picker_test.dart index 81021bfad4..fcabcb13f2 100644 --- a/packages/flutter/test/cupertino/picker_test.dart +++ b/packages/flutter/test/cupertino/picker_test.dart @@ -23,7 +23,7 @@ void main() { child: CupertinoPicker( scrollController: controller, itemExtent: 50.0, - onSelectedItemChanged: (_) {}, + onSelectedItemChanged: (_) { }, children: List.generate(3, (int index) { return Container( height: 50.0, @@ -79,7 +79,7 @@ void main() { Text('1'), Text('1'), ], - onSelectedItemChanged: (int i) {}, + onSelectedItemChanged: (int i) { }, ), ), ), @@ -121,7 +121,7 @@ void main() { Text('1'), Text('1'), ], - onSelectedItemChanged: (int i) {}, + onSelectedItemChanged: (int i) { }, ), ), ), @@ -154,7 +154,7 @@ void main() { Text('1'), Text('1'), ], - onSelectedItemChanged: (int i) {}, + onSelectedItemChanged: (int i) { }, ), ), ), diff --git a/packages/flutter/test/cupertino/segmented_control_test.dart b/packages/flutter/test/cupertino/segmented_control_test.dart index 20caee9b61..3a2a89a827 100644 --- a/packages/flutter/test/cupertino/segmented_control_test.dart +++ b/packages/flutter/test/cupertino/segmented_control_test.dart @@ -94,7 +94,7 @@ void main() { boilerplate( child: CupertinoSegmentedControl( children: children, - onValueChanged: (int newValue) {}, + onValueChanged: (int newValue) { }, ), ), ); @@ -109,7 +109,7 @@ void main() { boilerplate( child: CupertinoSegmentedControl( children: children, - onValueChanged: (int newValue) {}, + onValueChanged: (int newValue) { }, ), ), ); @@ -129,7 +129,7 @@ void main() { boilerplate( child: CupertinoSegmentedControl( children: children, - onValueChanged: (int newValue) {}, + onValueChanged: (int newValue) { }, groupValue: 2, ), ), @@ -147,7 +147,7 @@ void main() { boilerplate( child: CupertinoSegmentedControl( children: null, - onValueChanged: (int newValue) {}, + onValueChanged: (int newValue) { }, ), ), ); @@ -336,7 +336,7 @@ void main() { height: 200.0, child: CupertinoSegmentedControl( children: children, - onValueChanged: (int newValue) {}, + onValueChanged: (int newValue) { }, ), ), ), @@ -390,7 +390,7 @@ void main() { return boilerplate( child: CupertinoSegmentedControl( children: children, - onValueChanged: (int newValue) {}, + onValueChanged: (int newValue) { }, groupValue: sharedValue, ), ); @@ -546,7 +546,7 @@ void main() { child: CupertinoSegmentedControl( key: const ValueKey('Segmented Control'), children: children, - onValueChanged: (int newValue) {}, + onValueChanged: (int newValue) { }, ), ); }, @@ -578,7 +578,7 @@ void main() { child: CupertinoSegmentedControl( key: const ValueKey('Segmented Control'), children: children, - onValueChanged: (int newValue) {}, + onValueChanged: (int newValue) { }, ), ); }, @@ -616,7 +616,7 @@ void main() { CupertinoSegmentedControl( key: const ValueKey('Segmented Control'), children: children, - onValueChanged: (int newValue) {}, + onValueChanged: (int newValue) { }, ), ], ), @@ -642,7 +642,7 @@ void main() { child: Center( child: CupertinoSegmentedControl( children: children, - onValueChanged: (int newValue) {}, + onValueChanged: (int newValue) { }, ), ), ), @@ -1315,7 +1315,7 @@ void main() { child: CupertinoSegmentedControl( key: const ValueKey('Segmented Control'), children: children, - onValueChanged: (int newValue) {}, + onValueChanged: (int newValue) { }, groupValue: currentValue, ), ), @@ -1349,7 +1349,7 @@ void main() { child: CupertinoSegmentedControl( key: const ValueKey('Segmented Control'), children: children, - onValueChanged: (int newValue) {}, + onValueChanged: (int newValue) { }, groupValue: currentValue, ), ), diff --git a/packages/flutter/test/cupertino/slider_test.dart b/packages/flutter/test/cupertino/slider_test.dart index eec54996f6..c714356202 100644 --- a/packages/flutter/test/cupertino/slider_test.dart +++ b/packages/flutter/test/cupertino/slider_test.dart @@ -281,7 +281,7 @@ void main() { textDirection: TextDirection.ltr, child: CupertinoSlider( value: 0.5, - onChanged: (double v) {}, + onChanged: (double v) { }, ), )); @@ -366,7 +366,7 @@ void main() { CupertinoApp( home: Center( child: CupertinoSlider( - onChanged: (double value) {}, + onChanged: (double value) { }, value: 0.5, ), ), @@ -383,7 +383,7 @@ void main() { theme: const CupertinoThemeData(brightness: Brightness.dark), home: Center( child: CupertinoSlider( - onChanged: (double value) {}, + onChanged: (double value) { }, value: 0.5, ), ), @@ -402,7 +402,7 @@ void main() { home: Center( child: CupertinoSlider( activeColor: CupertinoColors.activeGreen, - onChanged: (double value) {}, + onChanged: (double value) { }, value: 0.5, ), ), diff --git a/packages/flutter/test/cupertino/switch_test.dart b/packages/flutter/test/cupertino/switch_test.dart index 6417b1fc9d..7980226aa5 100644 --- a/packages/flutter/test/cupertino/switch_test.dart +++ b/packages/flutter/test/cupertino/switch_test.dart @@ -211,7 +211,7 @@ void main() { children: [ CupertinoButton( child: const Text('Button'), - onPressed: (){ + onPressed: () { setState(() { value = !value; }); diff --git a/packages/flutter/test/foundation/change_notifier_test.dart b/packages/flutter/test/foundation/change_notifier_test.dart index 0cbc0ffd3e..3c09faaa3c 100644 --- a/packages/flutter/test/foundation/change_notifier_test.dart +++ b/packages/flutter/test/foundation/change_notifier_test.dart @@ -261,7 +261,7 @@ void main() { final TestNotifier source1 = TestNotifier(); final TestNotifier source2 = TestNotifier(); - final VoidCallback fakeListener = () {}; + final VoidCallback fakeListener = () { }; final Listenable listenableUnderTest = Listenable.merge([source1, source2]); expect(source1.isListenedTo, isFalse); diff --git a/packages/flutter/test/foundation/diagnostics_test.dart b/packages/flutter/test/foundation/diagnostics_test.dart index 294070d53e..de30978b19 100644 --- a/packages/flutter/test/foundation/diagnostics_test.dart +++ b/packages/flutter/test/foundation/diagnostics_test.dart @@ -951,7 +951,7 @@ void main() { }); test('callback property test', () { - final Function onClick = () {}; + final Function onClick = () { }; final ObjectFlagProperty present = ObjectFlagProperty( 'onClick', onClick, @@ -1385,7 +1385,7 @@ void main() { }); test('has property test', () { - final Function onClick = () {}; + final Function onClick = () { }; final ObjectFlagProperty has = ObjectFlagProperty.has( 'onClick', onClick, diff --git a/packages/flutter/test/gestures/tap_test.dart b/packages/flutter/test/gestures/tap_test.dart index f76f8ee4b6..e1305ad985 100644 --- a/packages/flutter/test/gestures/tap_test.dart +++ b/packages/flutter/test/gestures/tap_test.dart @@ -10,10 +10,10 @@ import 'gesture_tester.dart'; class TestGestureArenaMember extends GestureArenaMember { @override - void acceptGesture(int key) {} + void acceptGesture(int key) { } @override - void rejectGesture(int key) {} + void rejectGesture(int key) { } } void main() { diff --git a/packages/flutter/test/material/app_bar_theme_test.dart b/packages/flutter/test/material/app_bar_theme_test.dart index 2f854c78e7..40fd897930 100644 --- a/packages/flutter/test/material/app_bar_theme_test.dart +++ b/packages/flutter/test/material/app_bar_theme_test.dart @@ -17,7 +17,7 @@ void main() { await tester.pumpWidget(MaterialApp( home: Scaffold(appBar: AppBar( actions: [ - IconButton(icon: const Icon(Icons.share), onPressed: () {}), + IconButton(icon: const Icon(Icons.share), onPressed: () { }), ], )), )); @@ -45,7 +45,7 @@ void main() { home: Scaffold(appBar: AppBar( title: const Text('App Bar Title'), actions: [ - IconButton(icon: const Icon(Icons.share), onPressed: () {}), + IconButton(icon: const Icon(Icons.share), onPressed: () { }), ], )), )); @@ -85,7 +85,7 @@ void main() { actionsIconTheme: actionsIconThemeData, textTheme: textTheme, actions: [ - IconButton(icon: const Icon(Icons.share), onPressed: () {}), + IconButton(icon: const Icon(Icons.share), onPressed: () { }), ], )), )); @@ -118,7 +118,7 @@ void main() { iconTheme: iconThemeData, actionsIconTheme: actionsIconThemeData, actions: [ - IconButton(icon: const Icon(Icons.share), color: color, onPressed: () {}), + IconButton(icon: const Icon(Icons.share), color: color, onPressed: () { }), ], )), )); @@ -135,7 +135,7 @@ void main() { theme: themeData, home: Scaffold(appBar: AppBar( actions: [ - IconButton(icon: const Icon(Icons.share), onPressed: () {}), + IconButton(icon: const Icon(Icons.share), onPressed: () { }), ], )), )); @@ -162,7 +162,7 @@ void main() { theme: themeData, home: Scaffold(appBar: AppBar( actions: [ - IconButton(icon: const Icon(Icons.share), onPressed: () {}), + IconButton(icon: const Icon(Icons.share), onPressed: () { }), ], )), )); diff --git a/packages/flutter/test/material/buttons_test.dart b/packages/flutter/test/material/buttons_test.dart index 1b16af1304..a930d76de2 100644 --- a/packages/flutter/test/material/buttons_test.dart +++ b/packages/flutter/test/material/buttons_test.dart @@ -488,7 +488,7 @@ void main() { child: MaterialButton( key: key1, child: const SizedBox(width: 50.0, height: 8.0), - onPressed: () {}, + onPressed: () { }, ), ), ), @@ -509,7 +509,7 @@ void main() { child: MaterialButton( key: key2, child: const SizedBox(width: 50.0, height: 8.0), - onPressed: () {}, + onPressed: () { }, ), ), ), @@ -532,7 +532,7 @@ void main() { child: FlatButton( key: key1, child: const SizedBox(width: 50.0, height: 8.0), - onPressed: () {}, + onPressed: () { }, ), ), ), @@ -553,7 +553,7 @@ void main() { child: FlatButton( key: key2, child: const SizedBox(width: 50.0, height: 8.0), - onPressed: () {}, + onPressed: () { }, ), ), ), @@ -576,7 +576,7 @@ void main() { child: RaisedButton( key: key1, child: const SizedBox(width: 50.0, height: 8.0), - onPressed: () {}, + onPressed: () { }, ), ), ), @@ -597,7 +597,7 @@ void main() { child: RaisedButton( key: key2, child: const SizedBox(width: 50.0, height: 8.0), - onPressed: () {}, + onPressed: () { }, ), ), ), @@ -608,7 +608,7 @@ void main() { expect(tester.getSize(find.byKey(key2)), const Size(88.0, 36.0)); }); - testWidgets('RaisedButton has no clip by default', (WidgetTester tester) async{ + testWidgets('RaisedButton has no clip by default', (WidgetTester tester) async { await tester.pumpWidget( Directionality( textDirection: TextDirection.ltr, diff --git a/packages/flutter/test/material/checkbox_test.dart b/packages/flutter/test/material/checkbox_test.dart index bd11a6ce7d..3180ca3e8d 100644 --- a/packages/flutter/test/material/checkbox_test.dart +++ b/packages/flutter/test/material/checkbox_test.dart @@ -27,7 +27,7 @@ void main() { child: Center( child: Checkbox( value: true, - onChanged: (bool newValue) {}, + onChanged: (bool newValue) { }, ), ), ), @@ -46,7 +46,7 @@ void main() { child: Center( child: Checkbox( value: true, - onChanged: (bool newValue) {}, + onChanged: (bool newValue) { }, ), ), ), @@ -192,7 +192,7 @@ void main() { child: Checkbox( tristate: true, value: null, - onChanged: (bool newValue) {}, + onChanged: (bool newValue) { }, ), ), ); @@ -211,7 +211,7 @@ void main() { child: Checkbox( tristate: true, value: true, - onChanged: (bool newValue) {}, + onChanged: (bool newValue) { }, ), ), ); @@ -231,7 +231,7 @@ void main() { child: Checkbox( tristate: true, value: false, - onChanged: (bool newValue) {}, + onChanged: (bool newValue) { }, ), ), ); diff --git a/packages/flutter/test/material/chip_test.dart b/packages/flutter/test/material/chip_test.dart index 42c7f97840..225d472be0 100644 --- a/packages/flutter/test/material/chip_test.dart +++ b/packages/flutter/test/material/chip_test.dart @@ -234,7 +234,7 @@ void main() { 'available space and the delete icon is present', (WidgetTester tester) async { await _testConstrainedLabel( tester, - onDeleted: () {}, + onDeleted: () { }, ); }); @@ -244,7 +244,7 @@ void main() { await _testConstrainedLabel( tester, avatar: const CircleAvatar(child: Text('A')), - onDeleted: () {}, + onDeleted: () { }, ); }); @@ -294,7 +294,7 @@ void main() { return Material( child: Chip( deleteIcon: Icon(Icons.delete, key: iconKey), - onDeleted: () {}, + onDeleted: () { }, label: const Text('ABC'), ), ); @@ -467,7 +467,7 @@ void main() { Chip( deleteIcon: Container(key: keyA, width: 20.0, height: 20.0), label: const Text('Chip A'), - onDeleted: () {}, + onDeleted: () { }, ), ], ), @@ -496,7 +496,7 @@ void main() { width: 40.0, height: 40.0, ), - onDeleted: () {}, + onDeleted: () { }, ), ), ); @@ -533,7 +533,7 @@ void main() { width: 40.0, height: 40.0, ), - onDeleted: () {}, + onDeleted: () { }, ), ), ); @@ -1089,7 +1089,7 @@ void main() { child: StatefulBuilder(builder: (BuildContext context, StateSetter setState) { return RawChip( showCheckmark: showCheckmark, - onDeleted: isDeletable ? () {} : null, + onDeleted: isDeletable ? () { } : null, tapEnabled: true, avatar: avatar, deleteIcon: deleteIcon, @@ -1227,7 +1227,7 @@ void main() { home: Material( child: RawChip( label: const Text('test'), - onPressed: () {}, + onPressed: () { }, ), ), )); @@ -1354,7 +1354,7 @@ void main() { home: Material( child: RawChip( isEnabled: false, - onPressed: () {}, + onPressed: () { }, label: const Text('test'), ), ), @@ -1445,7 +1445,7 @@ void main() { MaterialApp( home: Material( child: ActionChip( - onPressed: (){}, + onPressed: () { }, label: const Text('action chip'), ), ), @@ -1459,7 +1459,7 @@ void main() { MaterialApp( home: Material( child: FilterChip( - onSelected: (bool valueChanged){}, + onSelected: (bool valueChanged) { }, selected: false, label: const Text('filter chip'), ), @@ -1568,7 +1568,7 @@ void main() { shape: const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(0.0))), avatar: const CircleAvatar(child: Text('A')), label: const Text('Chip A'), - onPressed: () {}, + onPressed: () { }, ), ), ); @@ -1602,19 +1602,19 @@ void main() { testWidgets('FilterChip clipBehavior properly passes through to the Material', (WidgetTester tester) async { const Text label = Text('label'); - await tester.pumpWidget(_wrapForChip(child: FilterChip(label: label, onSelected: (bool b){},))); + await tester.pumpWidget(_wrapForChip(child: FilterChip(label: label, onSelected: (bool b) { },))); checkChipMaterialClipBehavior(tester, Clip.none); - await tester.pumpWidget(_wrapForChip(child: FilterChip(label: label, onSelected: (bool b){}, clipBehavior: Clip.antiAlias))); + await tester.pumpWidget(_wrapForChip(child: FilterChip(label: label, onSelected: (bool b) { }, clipBehavior: Clip.antiAlias))); checkChipMaterialClipBehavior(tester, Clip.antiAlias); }); testWidgets('ActionChip clipBehavior properly passes through to the Material', (WidgetTester tester) async { const Text label = Text('label'); - await tester.pumpWidget(_wrapForChip(child: ActionChip(label: label, onPressed: (){},))); + await tester.pumpWidget(_wrapForChip(child: ActionChip(label: label, onPressed: () { },))); checkChipMaterialClipBehavior(tester, Clip.none); - await tester.pumpWidget(_wrapForChip(child: ActionChip(label: label, clipBehavior: Clip.antiAlias, onPressed: (){}))); + await tester.pumpWidget(_wrapForChip(child: ActionChip(label: label, clipBehavior: Clip.antiAlias, onPressed: () { }))); checkChipMaterialClipBehavior(tester, Clip.antiAlias); }); @@ -1656,7 +1656,7 @@ void main() { MaterialApp( home: Material( child: ActionChip( - onPressed: (){}, + onPressed: () { }, label: const Text('action chip'), ), ), diff --git a/packages/flutter/test/material/chip_theme_test.dart b/packages/flutter/test/material/chip_theme_test.dart index 3bca429112..75ce9beeb9 100644 --- a/packages/flutter/test/material/chip_theme_test.dart +++ b/packages/flutter/test/material/chip_theme_test.dart @@ -85,14 +85,14 @@ void main() { data: theme, child: RawChip( showCheckmark: true, - onDeleted: () {}, + onDeleted: () { }, tapEnabled: true, avatar: const Placeholder(), deleteIcon: const Placeholder(), isEnabled: true, selected: value, label: Text('$value'), - onSelected: (bool newValue) {}, + onSelected: (bool newValue) { }, onPressed: null, ), ), @@ -137,14 +137,14 @@ void main() { data: customTheme, child: RawChip( showCheckmark: true, - onDeleted: () {}, + onDeleted: () { }, tapEnabled: true, avatar: const Placeholder(), deleteIcon: const Placeholder(), isEnabled: true, selected: value, label: const Text('$value'), - onSelected: (bool newValue) {}, + onSelected: (bool newValue) { }, onPressed: null, ), ), diff --git a/packages/flutter/test/material/dropdown_test.dart b/packages/flutter/test/material/dropdown_test.dart index 6d60a986c1..14c0075f79 100644 --- a/packages/flutter/test/material/dropdown_test.dart +++ b/packages/flutter/test/material/dropdown_test.dart @@ -13,7 +13,7 @@ import 'package:flutter/rendering.dart'; import '../widgets/semantics_tester.dart'; const List menuItems = ['one', 'two', 'three', 'four']; -final ValueChanged onChanged = (_) {}; +final ValueChanged onChanged = (_) { }; final Type dropdownButtonType = DropdownButton( onChanged: (_) { }, @@ -299,7 +299,7 @@ void main() { child: const Text(value), ), ], - onChanged: (_) {}, + onChanged: (_) { }, ), ], ), @@ -757,7 +757,7 @@ void main() { buttonKey: key, value: null, items: menuItems, - onChanged: (String _) {}, + onChanged: (String _) { }, hint: const Text('test'), )); @@ -895,7 +895,7 @@ void main() { final DropdownButton button = DropdownButton( value: 50, - onChanged: (int newValue){}, + onChanged: (int newValue) { }, items: items, ); @@ -932,7 +932,7 @@ void main() { final DropdownButton button = DropdownButton( value: 99, - onChanged: (int newValue){}, + onChanged: (int newValue) { }, items: items, ); @@ -969,7 +969,7 @@ void main() { final DropdownButton button = DropdownButton( value: 0, - onChanged: (int newValue){}, + onChanged: (int newValue) { }, items: items, ); @@ -1006,7 +1006,7 @@ void main() { final DropdownButton button = DropdownButton( value: 99, - onChanged: (int newValue){}, + onChanged: (int newValue) { }, items: items, ); diff --git a/packages/flutter/test/material/expand_icon_test.dart b/packages/flutter/test/material/expand_icon_test.dart index bfe8587b7a..fc8c6fcce5 100644 --- a/packages/flutter/test/material/expand_icon_test.dart +++ b/packages/flutter/test/material/expand_icon_test.dart @@ -91,7 +91,7 @@ void main() { await tester.pumpWidget(wrap( child: ExpandIcon( isExpanded: true, - onPressed: (bool _) {}, + onPressed: (bool _) { }, ) )); @@ -106,7 +106,7 @@ void main() { await tester.pumpWidget(wrap( child: ExpandIcon( isExpanded: false, - onPressed: (bool _) {}, + onPressed: (bool _) { }, ) )); diff --git a/packages/flutter/test/material/flat_button_test.dart b/packages/flutter/test/material/flat_button_test.dart index 0079c9c7ab..097ede9f74 100644 --- a/packages/flutter/test/material/flat_button_test.dart +++ b/packages/flutter/test/material/flat_button_test.dart @@ -12,7 +12,7 @@ void main() { testWidgets('FlatButton implements debugFillDescription', (WidgetTester tester) async { final DiagnosticPropertiesBuilder builder = DiagnosticPropertiesBuilder(); FlatButton( - onPressed: () {}, + onPressed: () { }, textColor: const Color(0xFF00FF00), disabledTextColor: const Color(0xFFFF0000), color: const Color(0xFF000000), @@ -32,7 +32,7 @@ void main() { ]); }); - testWidgets('FlatButton has no clip by default', (WidgetTester tester) async{ + testWidgets('FlatButton has no clip by default', (WidgetTester tester) async { await tester.pumpWidget( Directionality( textDirection: TextDirection.ltr, diff --git a/packages/flutter/test/material/floating_action_button_test.dart b/packages/flutter/test/material/floating_action_button_test.dart index 9ecd7b629c..15b7ddb7b2 100644 --- a/packages/flutter/test/material/floating_action_button_test.dart +++ b/packages/flutter/test/material/floating_action_button_test.dart @@ -636,7 +636,7 @@ void main() { child: RepaintBoundary( key: key, child: FloatingActionButton( - onPressed: () {}, + onPressed: () { }, child: const Icon(Icons.add), ), ), @@ -655,7 +655,7 @@ void main() { ); }); - testWidgets('Floating Action Button has no clip by default', (WidgetTester tester) async{ + testWidgets('Floating Action Button has no clip by default', (WidgetTester tester) async { await tester.pumpWidget( Directionality( textDirection: TextDirection.ltr, diff --git a/packages/flutter/test/material/ink_splash_test.dart b/packages/flutter/test/material/ink_splash_test.dart index df38341c34..cd55df22af 100644 --- a/packages/flutter/test/material/ink_splash_test.dart +++ b/packages/flutter/test/material/ink_splash_test.dart @@ -14,7 +14,7 @@ void main() { body: Center( child: RaisedButton( child: const Text('Test'), - onPressed: () {}, + onPressed: () { }, shape: Border.all( color: Colors.blue, ), diff --git a/packages/flutter/test/material/ink_well_test.dart b/packages/flutter/test/material/ink_well_test.dart index d5865754a2..4eb20506b2 100644 --- a/packages/flutter/test/material/ink_well_test.dart +++ b/packages/flutter/test/material/ink_well_test.dart @@ -109,8 +109,8 @@ void main() { textDirection: TextDirection.ltr, child: Center( child: InkWell( - onTap: () {}, - onLongPress: () {}, + onTap: () { }, + onLongPress: () { }, ), ), ), @@ -137,8 +137,8 @@ void main() { textDirection: TextDirection.ltr, child: Center( child: InkWell( - onTap: () {}, - onLongPress: () {}, + onTap: () { }, + onLongPress: () { }, enableFeedback: false, ), ), diff --git a/packages/flutter/test/material/outline_button_test.dart b/packages/flutter/test/material/outline_button_test.dart index 7bd7e48efd..dedfc571fe 100644 --- a/packages/flutter/test/material/outline_button_test.dart +++ b/packages/flutter/test/material/outline_button_test.dart @@ -297,7 +297,7 @@ void main() { testWidgets('OutlineButton implements debugFillProperties', (WidgetTester tester) async { final DiagnosticPropertiesBuilder builder = DiagnosticPropertiesBuilder(); OutlineButton( - onPressed: () {}, + onPressed: () { }, textColor: const Color(0xFF00FF00), disabledTextColor: const Color(0xFFFF0000), color: const Color(0xFF000000), @@ -326,7 +326,7 @@ void main() { home: Scaffold( body: Center( child: OutlineButton( - onPressed: () {}, + onPressed: () { }, // Causes the button to be filled with the theme's canvasColor // instead of Colors.transparent before the button material's // elevation is animated to 2.0. diff --git a/packages/flutter/test/material/radio_test.dart b/packages/flutter/test/material/radio_test.dart index f0eee99ef5..efce00476b 100644 --- a/packages/flutter/test/material/radio_test.dart +++ b/packages/flutter/test/material/radio_test.dart @@ -77,7 +77,7 @@ void main() { key: key1, groupValue: true, value: true, - onChanged: (bool newValue) {}, + onChanged: (bool newValue) { }, ), ), ), @@ -99,7 +99,7 @@ void main() { key: key2, groupValue: true, value: true, - onChanged: (bool newValue) {}, + onChanged: (bool newValue) { }, ), ), ), diff --git a/packages/flutter/test/material/raw_material_button_test.dart b/packages/flutter/test/material/raw_material_button_test.dart index 97e7e94278..8f2b27228c 100644 --- a/packages/flutter/test/material/raw_material_button_test.dart +++ b/packages/flutter/test/material/raw_material_button_test.dart @@ -39,7 +39,7 @@ void main() { textDirection: TextDirection.ltr, child: Center( child: RawMaterialButton( - onPressed: () {}, + onPressed: () { }, constraints: BoxConstraints.tight(const Size(10.0, 10.0)), materialTapTargetSize: MaterialTapTargetSize.padded, child: const Text('+'), @@ -83,7 +83,7 @@ void main() { child: Center( child: RawMaterialButton( materialTapTargetSize: MaterialTapTargetSize.padded, - onPressed: () {}, + onPressed: () { }, fillColor: fillColor, highlightColor: highlightColor, splashColor: splashColor, @@ -115,7 +115,7 @@ void main() { child: Center( child: RawMaterialButton( materialTapTargetSize: MaterialTapTargetSize.padded, - onPressed: () {}, + onPressed: () { }, fillColor: fillColor, highlightColor: highlightColor, splashColor: splashColor, @@ -143,7 +143,7 @@ void main() { children: [ RawMaterialButton( materialTapTargetSize: MaterialTapTargetSize.padded, - onPressed: () {}, + onPressed: () { }, child: Container( width: 400.0, height: 400.0, @@ -173,7 +173,7 @@ void main() { children: [ RawMaterialButton( materialTapTargetSize: MaterialTapTargetSize.padded, - onPressed: () {}, + onPressed: () { }, child: SizedBox( key: key, width: 8.0, @@ -198,7 +198,7 @@ void main() { children: [ RawMaterialButton( key: key, - onPressed: () {}, + onPressed: () { }, child: const SizedBox(), ), ], diff --git a/packages/flutter/test/material/reorderable_list_test.dart b/packages/flutter/test/material/reorderable_list_test.dart index 1ca11ee22c..56f64f890c 100644 --- a/packages/flutter/test/material/reorderable_list_test.dart +++ b/packages/flutter/test/material/reorderable_list_test.dart @@ -132,7 +132,7 @@ void main() { ), ], scrollDirection: Axis.vertical, - onReorder: (int oldIndex, int newIndex) {}, + onReorder: (int oldIndex, int newIndex) { }, ); await tester.pumpWidget(MaterialApp( home: SizedBox( @@ -198,7 +198,7 @@ void main() { _Stateful(key: const Key('B')), _Stateful(key: const Key('C')), ], - onReorder: (int oldIndex, int newIndex) {}, + onReorder: (int oldIndex, int newIndex) { }, ), )); await tester.tap(find.byKey(const Key('A'))); @@ -215,7 +215,7 @@ void main() { _Stateful(key: const Key('C')), _Stateful(key: const Key('A')), ], - onReorder: (int oldIndex, int newIndex) {}, + onReorder: (int oldIndex, int newIndex) { }, ), )); // Only the 'A' widget should be checked. @@ -232,7 +232,7 @@ void main() { SizedBox(width: 100.0, height: 100.0, child: Text('B'), key: Key('B')), SizedBox(width: 100.0, height: 100.0, child: Text('A'), key: Key('A')), ], - onReorder: (int oldIndex, int newIndex) {}, + onReorder: (int oldIndex, int newIndex) { }, ); Widget buildWithScrollController(ScrollController controller) { @@ -270,7 +270,7 @@ void main() { SizedBox(width: 100.0, height: 100.0, child: Text('B'), key: Key('B')), SizedBox(width: 100.0, height: 100.0, child: Text('A'), key: Key('A')), ], - onReorder: (int oldIndex, int newIndex) {}, + onReorder: (int oldIndex, int newIndex) { }, ); final Widget boilerplate = Localizations( locale: const Locale('en'), @@ -441,7 +441,7 @@ void main() { child: SwitchListTile( title: const Text('Switch tile'), value: true, - onChanged: (bool newValue) {}, + onChanged: (bool newValue) { }, ), ), ), @@ -452,7 +452,7 @@ void main() { ), ], scrollDirection: Axis.vertical, - onReorder: (int oldIndex, int newIndex) {}, + onReorder: (int oldIndex, int newIndex) { }, ); await tester.pumpWidget(MaterialApp( home: SizedBox( @@ -560,7 +560,7 @@ void main() { ), ], scrollDirection: Axis.horizontal, - onReorder: (int oldIndex, int newIndex) {}, + onReorder: (int oldIndex, int newIndex) { }, ); await tester.pumpWidget(MaterialApp( home: SizedBox( @@ -627,7 +627,7 @@ void main() { _Stateful(key: const Key('B')), _Stateful(key: const Key('C')), ], - onReorder: (int oldIndex, int newIndex) {}, + onReorder: (int oldIndex, int newIndex) { }, scrollDirection: Axis.horizontal, ), )); @@ -645,7 +645,7 @@ void main() { _Stateful(key: const Key('C')), _Stateful(key: const Key('A')), ], - onReorder: (int oldIndex, int newIndex) {}, + onReorder: (int oldIndex, int newIndex) { }, scrollDirection: Axis.horizontal, ), )); @@ -917,7 +917,7 @@ void main() { ), ], reverse: true, - onReorder: (int oldIndex, int newIndex) {}, + onReorder: (int oldIndex, int newIndex) { }, ); await tester.pumpWidget(MaterialApp( home: reorderableListView, diff --git a/packages/flutter/test/material/scaffold_test.dart b/packages/flutter/test/material/scaffold_test.dart index 5e947ac625..176d10d9b5 100644 --- a/packages/flutter/test/material/scaffold_test.dart +++ b/packages/flutter/test/material/scaffold_test.dart @@ -915,7 +915,7 @@ void main() { floatingActionButton: FloatingActionButton( key: key, child: _GeometryListener(), - onPressed: () {}, + onPressed: () { }, ), ))); @@ -962,7 +962,7 @@ void main() { floatingActionButton: FloatingActionButton( key: key, child: _GeometryListener(), - onPressed: () {}, + onPressed: () { }, ), ))); @@ -1030,7 +1030,7 @@ void main() { floatingActionButton: FloatingActionButton( key: key, child: _GeometryListener(), - onPressed: () {}, + onPressed: () { }, ), ))); diff --git a/packages/flutter/test/material/search_test.dart b/packages/flutter/test/material/search_test.dart index 1679ad1a62..7929022d24 100644 --- a/packages/flutter/test/material/search_test.dart +++ b/packages/flutter/test/material/search_test.dart @@ -72,7 +72,7 @@ void main() { // Simulate system back button final ByteData message = const JSONMethodCodec().encodeMethodCall(const MethodCall('popRoute')); - await BinaryMessages.handlePlatformMessage('flutter/navigation', message, (_) {}); + await BinaryMessages.handlePlatformMessage('flutter/navigation', message, (_) { }); await tester.pumpAndSettle(); expect(selectedResults, [null]); diff --git a/packages/flutter/test/material/slider_test.dart b/packages/flutter/test/material/slider_test.dart index 869a7a22d8..e10459b2e2 100644 --- a/packages/flutter/test/material/slider_test.dart +++ b/packages/flutter/test/material/slider_test.dart @@ -1167,7 +1167,7 @@ void main() { child: Material( child: Slider( value: 0.5, - onChanged: (double v) {}, + onChanged: (double v) { }, ), ), ), @@ -1232,7 +1232,7 @@ void main() { value: 100.0, min: 0.0, max: 200.0, - onChanged: (double v) {}, + onChanged: (double v) { }, ), ), ), @@ -1273,7 +1273,7 @@ void main() { max: 200.0, divisions: 10, semanticFormatterCallback: (double value) => value.round().toString(), - onChanged: (double v) {}, + onChanged: (double v) { }, ), ), ), diff --git a/packages/flutter/test/material/slider_theme_test.dart b/packages/flutter/test/material/slider_theme_test.dart index 77523cfbff..a3ff5e8207 100644 --- a/packages/flutter/test/material/slider_theme_test.dart +++ b/packages/flutter/test/material/slider_theme_test.dart @@ -299,7 +299,7 @@ void main() { value: sliderValue, label: '$value', divisions: 3, - onChanged: (double d) {}, + onChanged: (double d) { }, ), ), ), diff --git a/packages/flutter/test/material/snack_bar_test.dart b/packages/flutter/test/material/snack_bar_test.dart index e817af1aeb..5c26ed560c 100644 --- a/packages/flutter/test/material/snack_bar_test.dart +++ b/packages/flutter/test/material/snack_bar_test.dart @@ -312,7 +312,7 @@ void main() { textColor: Colors.lightBlue, disabledTextColor: Colors.red, label: 'ACTION', - onPressed: () {}, + onPressed: () { }, ), ), ); @@ -359,7 +359,7 @@ void main() { Scaffold.of(context).showSnackBar(SnackBar( content: const Text('I am a snack bar.'), duration: const Duration(seconds: 2), - action: SnackBarAction(label: 'ACTION', onPressed: () {}), + action: SnackBarAction(label: 'ACTION', onPressed: () { }), )); }, child: const Text('X'), @@ -416,7 +416,7 @@ void main() { Scaffold.of(context).showSnackBar(SnackBar( content: const Text('I am a snack bar.'), duration: const Duration(seconds: 2), - action: SnackBarAction(label: 'ACTION', onPressed: () {}), + action: SnackBarAction(label: 'ACTION', onPressed: () { }), )); }, child: const Text('X'), @@ -543,7 +543,7 @@ void main() { duration: const Duration(seconds: 1), action: SnackBarAction( label: 'ACTION', - onPressed: () {}, + onPressed: () { }, ), )); }, @@ -585,7 +585,7 @@ void main() { duration: const Duration(seconds: 1), action: SnackBarAction( label: 'ACTION', - onPressed: () {}, + onPressed: () { }, ), )); }, @@ -670,7 +670,7 @@ void main() { onTap: () { Scaffold.of(context).showSnackBar(SnackBar( content: const Text('test'), - action: SnackBarAction(label: 'foo', onPressed: () {}), + action: SnackBarAction(label: 'foo', onPressed: () { }), )); }, behavior: HitTestBehavior.opaque, diff --git a/packages/flutter/test/material/switch_test.dart b/packages/flutter/test/material/switch_test.dart index 0742a5623d..7c0fc91451 100644 --- a/packages/flutter/test/material/switch_test.dart +++ b/packages/flutter/test/material/switch_test.dart @@ -57,7 +57,7 @@ void main() { child: Switch( dragStartBehavior: DragStartBehavior.down, value: true, - onChanged: (bool newValue) {}, + onChanged: (bool newValue) { }, ), ), ), @@ -77,7 +77,7 @@ void main() { child: Switch( dragStartBehavior: DragStartBehavior.down, value: true, - onChanged: (bool newValue) {}, + onChanged: (bool newValue) { }, ), ), ), diff --git a/packages/flutter/test/material/text_field_test.dart b/packages/flutter/test/material/text_field_test.dart index 2d22bb70c2..20dadfc3e1 100644 --- a/packages/flutter/test/material/text_field_test.dart +++ b/packages/flutter/test/material/text_field_test.dart @@ -193,7 +193,7 @@ void main() { } testWidgets('TextField passes onEditingComplete to EditableText', (WidgetTester tester) async { - final VoidCallback onEditingComplete = () {}; + final VoidCallback onEditingComplete = () { }; await tester.pumpWidget( MaterialApp( @@ -2443,7 +2443,7 @@ void main() { }); } - group('Keyboard Tests', (){ + group('Keyboard Tests', () { TextEditingController controller; setUp( () { @@ -2470,7 +2470,7 @@ void main() { ); } - testWidgets('Shift test 1', (WidgetTester tester) async{ + testWidgets('Shift test 1', (WidgetTester tester) async { await tester.pumpWidget(setupWidget()); const String testValue = 'a big house'; @@ -2484,7 +2484,7 @@ void main() { expect(controller.selection.extentOffset - controller.selection.baseOffset, 1); }); - testWidgets('Control Shift test', (WidgetTester tester) async{ + testWidgets('Control Shift test', (WidgetTester tester) async { await tester.pumpWidget(setupWidget()); const String testValue = 'their big house'; await tester.enterText(find.byType(TextField), testValue); @@ -2500,7 +2500,7 @@ void main() { expect(controller.selection.extentOffset - controller.selection.baseOffset, 5); }); - testWidgets('Down and up test', (WidgetTester tester) async{ + testWidgets('Down and up test', (WidgetTester tester) async { await tester.pumpWidget(setupWidget()); const String testValue = 'a big house'; await tester.enterText(find.byType(TextField), testValue); @@ -2522,7 +2522,7 @@ void main() { expect(controller.selection.extentOffset - controller.selection.baseOffset, 0); }); - testWidgets('Down and up test 2', (WidgetTester tester) async{ + testWidgets('Down and up test 2', (WidgetTester tester) async { await tester.pumpWidget(setupWidget()); const String testValue = 'a big house\njumped over a mouse\nOne more line yay'; // 11 \n 19 await tester.enterText(find.byType(TextField), testValue); @@ -2580,7 +2580,7 @@ void main() { const int _kAKeyCode = 29; const int _kDelKeyCode = 112; - testWidgets('Copy paste test', (WidgetTester tester) async{ + testWidgets('Copy paste test', (WidgetTester tester) async { final FocusNode focusNode = FocusNode(); final TextEditingController controller = TextEditingController(); final TextField textField = @@ -2651,7 +2651,7 @@ void main() { expect(find.text(expected), findsOneWidget); }); - testWidgets('Cut test', (WidgetTester tester) async{ + testWidgets('Cut test', (WidgetTester tester) async { final FocusNode focusNode = FocusNode(); final TextEditingController controller = TextEditingController(); final TextField textField = @@ -2723,7 +2723,7 @@ void main() { expect(find.text(expected), findsOneWidget); }); - testWidgets('Select all test', (WidgetTester tester) async{ + testWidgets('Select all test', (WidgetTester tester) async { final FocusNode focusNode = FocusNode(); final TextEditingController controller = TextEditingController(); final TextField textField = @@ -2769,7 +2769,7 @@ void main() { expect(find.text(expected), findsOneWidget); }); - testWidgets('Delete test', (WidgetTester tester) async{ + testWidgets('Delete test', (WidgetTester tester) async { final FocusNode focusNode = FocusNode(); final TextEditingController controller = TextEditingController(); final TextField textField = @@ -2823,7 +2823,7 @@ void main() { expect(find.text(expected2), findsOneWidget); }); - testWidgets('Changing positions of text fields', (WidgetTester tester) async{ + testWidgets('Changing positions of text fields', (WidgetTester tester) async { final FocusNode focusNode = FocusNode(); final List events = []; diff --git a/packages/flutter/test/material/text_form_field_test.dart b/packages/flutter/test/material/text_form_field_test.dart index d6871bd503..686c4bc7c9 100644 --- a/packages/flutter/test/material/text_form_field_test.dart +++ b/packages/flutter/test/material/text_form_field_test.dart @@ -50,7 +50,7 @@ void main() { }); testWidgets('Passes onEditingComplete to underlying TextField', (WidgetTester tester) async { - final VoidCallback onEditingComplete = () {}; + final VoidCallback onEditingComplete = () { }; await tester.pumpWidget( MaterialApp( diff --git a/packages/flutter/test/material/user_accounts_drawer_header_test.dart b/packages/flutter/test/material/user_accounts_drawer_header_test.dart index 91fca26a69..6d997362ed 100644 --- a/packages/flutter/test/material/user_accounts_drawer_header_test.dart +++ b/packages/flutter/test/material/user_accounts_drawer_header_test.dart @@ -32,7 +32,7 @@ Future pumpTestWidget( child: Material( child: Center( child: UserAccountsDrawerHeader( - onDetailsPressed: withOnDetailsPressedHandler ? () {} : null, + onDetailsPressed: withOnDetailsPressedHandler ? () { } : null, currentAccountPicture: const ExcludeSemantics( child: CircleAvatar( key: avatarA, diff --git a/packages/flutter/test/painting/image_cache_test.dart b/packages/flutter/test/painting/image_cache_test.dart index 83da3dced2..a3ec625a36 100644 --- a/packages/flutter/test/painting/image_cache_test.dart +++ b/packages/flutter/test/painting/image_cache_test.dart @@ -199,7 +199,7 @@ void main() { test('failed image can successfully be removed from the cache\'s pending images', () async { const TestImage testImage = TestImage(width: 8, height: 8); - const FailingTestImageProvider(1, 1, image: testImage).resolve(ImageConfiguration.empty).addListener((ImageInfo image, bool synchronousCall){}, onError: (dynamic exception, StackTrace stackTrace) { + const FailingTestImageProvider(1, 1, image: testImage).resolve(ImageConfiguration.empty).addListener((ImageInfo image, bool synchronousCall) { }, onError: (dynamic exception, StackTrace stackTrace) { final bool evicationResult = imageCache.evict(1); expect(evicationResult, isTrue); }); diff --git a/packages/flutter/test/painting/image_stream_test.dart b/packages/flutter/test/painting/image_stream_test.dart index ab20df0710..c6c545fe9a 100644 --- a/packages/flutter/test/painting/image_stream_test.dart +++ b/packages/flutter/test/painting/image_stream_test.dart @@ -37,7 +37,7 @@ class FakeImage implements Image { int get height => _height; @override - void dispose() {} + void dispose() { } @override Future toByteData({ ImageByteFormat format = ImageByteFormat.rawRgba }) async { @@ -73,7 +73,7 @@ class MockCodec implements Codec { } @override - void dispose() {} + void dispose() { } } @@ -293,7 +293,7 @@ void main() { scale: 1.0, ); - final ImageListener listener = (ImageInfo image, bool synchronousCall) {}; + final ImageListener listener = (ImageInfo image, bool synchronousCall) { }; imageStream.addListener(listener); codecCompleter.complete(mockCodec); @@ -377,7 +377,7 @@ void main() { scale: 1.0, ); - final ImageListener listener = (ImageInfo image, bool synchronousCall) {}; + final ImageListener listener = (ImageInfo image, bool synchronousCall) { }; imageStream.addListener(listener); codecCompleter.complete(mockCodec); @@ -410,7 +410,7 @@ void main() { scale: 1.0, ); - final ImageListener listener = (ImageInfo image, bool synchronousCall) {}; + final ImageListener listener = (ImageInfo image, bool synchronousCall) { }; imageStream.addListener(listener); codecCompleter.complete(mockCodec); @@ -451,7 +451,7 @@ void main() { }; streamUnderTest.addListener( - (ImageInfo image, bool synchronousCall) {}, + (ImageInfo image, bool synchronousCall) { }, onError: errorListener, ); diff --git a/packages/flutter/test/painting/mocks_for_image_cache.dart b/packages/flutter/test/painting/mocks_for_image_cache.dart index db24a3ee29..f751449098 100644 --- a/packages/flutter/test/painting/mocks_for_image_cache.dart +++ b/packages/flutter/test/painting/mocks_for_image_cache.dart @@ -74,7 +74,7 @@ class TestImage implements ui.Image { final int width; @override - void dispose() {} + void dispose() { } @override Future toByteData({ ImageByteFormat format = ImageByteFormat.rawRgba }) { diff --git a/packages/flutter/test/rendering/editable_test.dart b/packages/flutter/test/rendering/editable_test.dart index 6bf76b7dab..f54ba7a35c 100644 --- a/packages/flutter/test/rendering/editable_test.dart +++ b/packages/flutter/test/rendering/editable_test.dart @@ -17,13 +17,13 @@ class FakeEditableTextState extends TextSelectionDelegate { TextEditingValue get textEditingValue { return const TextEditingValue(); } @override - set textEditingValue(TextEditingValue value) {} + set textEditingValue(TextEditingValue value) { } @override - void hideToolbar() {} + void hideToolbar() { } @override - void bringIntoView(TextPosition position) {} + void bringIntoView(TextPosition position) { } } void main() { diff --git a/packages/flutter/test/rendering/object_test.dart b/packages/flutter/test/rendering/object_test.dart index b8e0d56836..369545aa86 100644 --- a/packages/flutter/test/rendering/object_test.dart +++ b/packages/flutter/test/rendering/object_test.dart @@ -39,16 +39,16 @@ void main() { class TestRenderObject extends RenderObject { @override - void debugAssertDoesMeetConstraints() {} + void debugAssertDoesMeetConstraints() { } @override Rect get paintBounds => null; @override - void performLayout() {} + void performLayout() { } @override - void performResize() {} + void performResize() { } @override Rect get semanticBounds => Rect.fromLTWH(0.0, 0.0, 10.0, 20.0); diff --git a/packages/flutter/test/rendering/proxy_box_test.dart b/packages/flutter/test/rendering/proxy_box_test.dart index 09519e95b8..dd19dc79fa 100644 --- a/packages/flutter/test/rendering/proxy_box_test.dart +++ b/packages/flutter/test/rendering/proxy_box_test.dart @@ -78,8 +78,8 @@ void main() { test('RenderSemanticsGestureHandler adds/removes correct semantic actions', () { final RenderSemanticsGestureHandler renderObj = RenderSemanticsGestureHandler( - onTap: () {}, - onHorizontalDragUpdate: (DragUpdateDetails details) {}, + onTap: () { }, + onHorizontalDragUpdate: (DragUpdateDetails details) { }, ); SemanticsConfiguration config = SemanticsConfiguration(); @@ -287,7 +287,7 @@ class _FakeTicker implements Ticker { bool muted; @override - void absorbTicker(Ticker originalTicker) {} + void absorbTicker(Ticker originalTicker) { } @override String get debugLabel => null; @@ -305,10 +305,10 @@ class _FakeTicker implements Ticker { bool get shouldScheduleTick => null; @override - void dispose() {} + void dispose() { } @override - void scheduleTick({ bool rescheduling = false }) {} + void scheduleTick({ bool rescheduling = false }) { } @override TickerFuture start() { @@ -316,10 +316,10 @@ class _FakeTicker implements Ticker { } @override - void stop({ bool canceled = false }) {} + void stop({ bool canceled = false }) { } @override - void unscheduleTick() {} + void unscheduleTick() { } @override String toString({ bool debugIncludeStack = false }) => super.toString(); diff --git a/packages/flutter/test/scheduler/ticker_test.dart b/packages/flutter/test/scheduler/ticker_test.dart index 2d141da994..6133c46471 100644 --- a/packages/flutter/test/scheduler/ticker_test.dart +++ b/packages/flutter/test/scheduler/ticker_test.dart @@ -129,7 +129,7 @@ void main() { expect(tickCount, equals(0)); final ByteData message = const StringCodec().encodeMessage('AppLifecycleState.paused'); - await BinaryMessages.handlePlatformMessage('flutter/lifecycle', message, (_) {}); + await BinaryMessages.handlePlatformMessage('flutter/lifecycle', message, (_) { }); expect(ticker.isTicking, isFalse); expect(ticker.isActive, isTrue); @@ -138,7 +138,7 @@ void main() { testWidgets('Ticker can be created before application unpauses', (WidgetTester tester) async { final ByteData pausedMessage = const StringCodec().encodeMessage('AppLifecycleState.paused'); - await BinaryMessages.handlePlatformMessage('flutter/lifecycle', pausedMessage, (_) {}); + await BinaryMessages.handlePlatformMessage('flutter/lifecycle', pausedMessage, (_) { }); int tickCount = 0; void handleTick(Duration duration) { @@ -157,7 +157,7 @@ void main() { expect(ticker.isTicking, isFalse); final ByteData resumedMessage = const StringCodec().encodeMessage('AppLifecycleState.resumed'); - await BinaryMessages.handlePlatformMessage('flutter/lifecycle', resumedMessage, (_) {}); + await BinaryMessages.handlePlatformMessage('flutter/lifecycle', resumedMessage, (_) { }); await tester.pump(const Duration(milliseconds: 10)); diff --git a/packages/flutter/test/semantics/semantics_test.dart b/packages/flutter/test/semantics/semantics_test.dart index 66fcfd3905..fa49c9bedf 100644 --- a/packages/flutter/test/semantics/semantics_test.dart +++ b/packages/flutter/test/semantics/semantics_test.dart @@ -413,9 +413,9 @@ void main() { const CustomSemanticsAction action2 = CustomSemanticsAction(label: 'action2'); const CustomSemanticsAction action3 = CustomSemanticsAction(label: 'action3'); configuration.customSemanticsActions = { - action1: () {}, - action2: () {}, - action3: () {}, + action1: () { }, + action2: () { }, + action3: () { }, }; final SemanticsNode actionNode = SemanticsNode(); actionNode.updateWith(config: configuration); @@ -499,7 +499,7 @@ void main() { final MoveCursorHandler onMoveCursorForwardByCharacter = (bool _) { }; final MoveCursorHandler onMoveCursorBackwardByCharacter = (bool _) { }; final VoidCallback onTap = () { }; - final VoidCallback onCustomAction = () {}; + final VoidCallback onCustomAction = () { }; config.onShowOnScreen = onShowOnScreen; config.onScrollDown = onScrollDown; diff --git a/packages/flutter/test/services/platform_channel_test.dart b/packages/flutter/test/services/platform_channel_test.dart index 36f25eab3c..243a254e39 100644 --- a/packages/flutter/test/services/platform_channel_test.dart +++ b/packages/flutter/test/services/platform_channel_test.dart @@ -199,7 +199,7 @@ void main() { BinaryMessages.handlePlatformMessage( 'ch', event, - (ByteData reply) {}, + (ByteData reply) { }, ); } test('can receive event stream', () async { diff --git a/packages/flutter/test/services/platform_views_test.dart b/packages/flutter/test/services/platform_views_test.dart index 67fa4006a4..b0547caec3 100644 --- a/packages/flutter/test/services/platform_views_test.dart +++ b/packages/flutter/test/services/platform_views_test.dart @@ -147,8 +147,7 @@ void main() { }); }); - group('iOS', () - { + group('iOS', () { FakeIosPlatformViewsController viewsController; setUp(() { viewsController = FakeIosPlatformViewsController(); diff --git a/packages/flutter/test/widgets/animated_cross_fade_test.dart b/packages/flutter/test/widgets/animated_cross_fade_test.dart index 1500ae0390..3c5d82328c 100644 --- a/packages/flutter/test/widgets/animated_cross_fade_test.dart +++ b/packages/flutter/test/widgets/animated_cross_fade_test.dart @@ -376,7 +376,7 @@ class _TickerWatchingWidgetState extends State<_TickerWatchingWidget> with Singl @override void initState() { super.initState(); - ticker = createTicker((_) {})..start(); + ticker = createTicker((_) { })..start(); } @override diff --git a/packages/flutter/test/widgets/automatic_keep_alive_test.dart b/packages/flutter/test/widgets/automatic_keep_alive_test.dart index d9a60c904f..7ef38b7bed 100644 --- a/packages/flutter/test/widgets/automatic_keep_alive_test.dart +++ b/packages/flutter/test/widgets/automatic_keep_alive_test.dart @@ -480,7 +480,7 @@ void main() { dragStartBehavior: DragStartBehavior.down, addSemanticIndexes: false, itemCount: 50, - itemBuilder: (BuildContext context, int index){ + itemBuilder: (BuildContext context, int index) { if (index == 0){ return const _AlwaysKeepAlive( key: GlobalObjectKey<_AlwaysKeepAliveState>(0), @@ -514,7 +514,7 @@ void main() { child: ListView.builder( addSemanticIndexes: false, itemCount: 250, - itemBuilder: (BuildContext context, int index){ + itemBuilder: (BuildContext context, int index) { if (index % 2 == 0){ return _AlwaysKeepAlive( key: GlobalObjectKey<_AlwaysKeepAliveState>(index), @@ -631,5 +631,5 @@ class RenderSliverMultiBoxAdaptorAlt extends RenderSliver with } @override - void performLayout() {} + void performLayout() { } } diff --git a/packages/flutter/test/widgets/binding_test.dart b/packages/flutter/test/widgets/binding_test.dart index 858d749e4e..fdcc37ba4e 100644 --- a/packages/flutter/test/widgets/binding_test.dart +++ b/packages/flutter/test/widgets/binding_test.dart @@ -46,7 +46,7 @@ void main() { WidgetsBinding.instance.addObserver(observer); final ByteData message = const JSONMessageCodec().encodeMessage( {'type': 'memoryPressure'}); - await BinaryMessages.handlePlatformMessage('flutter/system', message, (_) {}); + await BinaryMessages.handlePlatformMessage('flutter/system', message, (_) { }); expect(observer.sawMemoryPressure, true); WidgetsBinding.instance.removeObserver(observer); }); @@ -56,19 +56,19 @@ void main() { WidgetsBinding.instance.addObserver(observer); ByteData message = const StringCodec().encodeMessage('AppLifecycleState.paused'); - await BinaryMessages.handlePlatformMessage('flutter/lifecycle', message, (_) {}); + await BinaryMessages.handlePlatformMessage('flutter/lifecycle', message, (_) { }); expect(observer.lifecycleState, AppLifecycleState.paused); message = const StringCodec().encodeMessage('AppLifecycleState.resumed'); - await BinaryMessages.handlePlatformMessage('flutter/lifecycle', message, (_) {}); + await BinaryMessages.handlePlatformMessage('flutter/lifecycle', message, (_) { }); expect(observer.lifecycleState, AppLifecycleState.resumed); message = const StringCodec().encodeMessage('AppLifecycleState.inactive'); - await BinaryMessages.handlePlatformMessage('flutter/lifecycle', message, (_) {}); + await BinaryMessages.handlePlatformMessage('flutter/lifecycle', message, (_) { }); expect(observer.lifecycleState, AppLifecycleState.inactive); message = const StringCodec().encodeMessage('AppLifecycleState.suspending'); - await BinaryMessages.handlePlatformMessage('flutter/lifecycle', message, (_) {}); + await BinaryMessages.handlePlatformMessage('flutter/lifecycle', message, (_) { }); expect(observer.lifecycleState, AppLifecycleState.suspending); }); @@ -79,7 +79,7 @@ void main() { const String testRouteName = 'testRouteName'; final ByteData message = const JSONMethodCodec().encodeMethodCall( const MethodCall('pushRoute', testRouteName)); - await BinaryMessages.handlePlatformMessage('flutter/navigation', message, (_) {}); + await BinaryMessages.handlePlatformMessage('flutter/navigation', message, (_) { }); expect(observer.pushedRoute, testRouteName); WidgetsBinding.instance.removeObserver(observer); @@ -90,31 +90,31 @@ void main() { expect(tester.binding.hasScheduledFrame, isFalse); message = const StringCodec().encodeMessage('AppLifecycleState.paused'); - await BinaryMessages.handlePlatformMessage('flutter/lifecycle', message, (_) {}); + await BinaryMessages.handlePlatformMessage('flutter/lifecycle', message, (_) { }); expect(tester.binding.hasScheduledFrame, isFalse); message = const StringCodec().encodeMessage('AppLifecycleState.resumed'); - await BinaryMessages.handlePlatformMessage('flutter/lifecycle', message, (_) {}); + await BinaryMessages.handlePlatformMessage('flutter/lifecycle', message, (_) { }); expect(tester.binding.hasScheduledFrame, isTrue); await tester.pump(); expect(tester.binding.hasScheduledFrame, isFalse); message = const StringCodec().encodeMessage('AppLifecycleState.inactive'); - await BinaryMessages.handlePlatformMessage('flutter/lifecycle', message, (_) {}); + await BinaryMessages.handlePlatformMessage('flutter/lifecycle', message, (_) { }); expect(tester.binding.hasScheduledFrame, isFalse); message = const StringCodec().encodeMessage('AppLifecycleState.suspending'); - await BinaryMessages.handlePlatformMessage('flutter/lifecycle', message, (_) {}); + await BinaryMessages.handlePlatformMessage('flutter/lifecycle', message, (_) { }); expect(tester.binding.hasScheduledFrame, isFalse); message = const StringCodec().encodeMessage('AppLifecycleState.inactive'); - await BinaryMessages.handlePlatformMessage('flutter/lifecycle', message, (_) {}); + await BinaryMessages.handlePlatformMessage('flutter/lifecycle', message, (_) { }); expect(tester.binding.hasScheduledFrame, isTrue); await tester.pump(); expect(tester.binding.hasScheduledFrame, isFalse); message = const StringCodec().encodeMessage('AppLifecycleState.paused'); - await BinaryMessages.handlePlatformMessage('flutter/lifecycle', message, (_) {}); + await BinaryMessages.handlePlatformMessage('flutter/lifecycle', message, (_) { }); expect(tester.binding.hasScheduledFrame, isFalse); tester.binding.scheduleFrame(); diff --git a/packages/flutter/test/widgets/build_scope_test.dart b/packages/flutter/test/widgets/build_scope_test.dart index fbcebb852a..d67b9e267e 100644 --- a/packages/flutter/test/widgets/build_scope_test.dart +++ b/packages/flutter/test/widgets/build_scope_test.dart @@ -18,18 +18,18 @@ class ProbeWidgetState extends State { @override void initState() { super.initState(); - setState(() {}); + setState(() { }); } @override void didUpdateWidget(ProbeWidget oldWidget) { super.didUpdateWidget(oldWidget); - setState(() {}); + setState(() { }); } @override Widget build(BuildContext context) { - setState(() {}); + setState(() { }); buildCount++; return Container(); } diff --git a/packages/flutter/test/widgets/custom_painter_test.dart b/packages/flutter/test/widgets/custom_painter_test.dart index cc968fba73..af30adefbc 100644 --- a/packages/flutter/test/widgets/custom_painter_test.dart +++ b/packages/flutter/test/widgets/custom_painter_test.dart @@ -234,14 +234,14 @@ void _defineTests() { decreasedValue: 'decrease-after', hint: 'hint-after', textDirection: TextDirection.ltr, - onScrollDown: () {}, - onLongPress: () {}, - onDecrease: () {}, - onIncrease: () {}, - onScrollLeft: () {}, - onScrollRight: () {}, - onScrollUp: () {}, - onTap: () {}, + onScrollDown: () { }, + onLongPress: () { }, + onDecrease: () { }, + onIncrease: () { }, + onScrollLeft: () { }, + onScrollRight: () { }, + onScrollUp: () { }, + onTap: () { }, ), ), ), diff --git a/packages/flutter/test/widgets/editable_text_test.dart b/packages/flutter/test/widgets/editable_text_test.dart index 5544ad8dc6..11d0be495f 100644 --- a/packages/flutter/test/widgets/editable_text_test.dart +++ b/packages/flutter/test/widgets/editable_text_test.dart @@ -784,7 +784,7 @@ void main() { cursorColor: Colors.blue, selectionControls: materialTextSelectionControls, keyboardType: TextInputType.text, - onChanged: (String value) {}, + onChanged: (String value) { }, ), ), ), diff --git a/packages/flutter/test/widgets/fade_in_image_test.dart b/packages/flutter/test/widgets/fade_in_image_test.dart index e519386625..5200c7913a 100644 --- a/packages/flutter/test/widgets/fade_in_image_test.dart +++ b/packages/flutter/test/widgets/fade_in_image_test.dart @@ -137,7 +137,7 @@ Future main() async { fadeOutDuration: animationDuration, fadeInDuration: animationDuration, imageSemanticLabel: imageSemanticText, - placeholderSemanticLabel: placeholderSemanticText + placeholderSemanticLabel: placeholderSemanticText, )); placeholderProvider.complete(); // load the placeholder @@ -164,7 +164,7 @@ Future main() async { image: imageProvider, fadeOutDuration: animationDuration, fadeInDuration: animationDuration, - placeholderSemanticLabel: placeholderSemanticText + placeholderSemanticLabel: placeholderSemanticText, )); placeholderProvider.complete(); // load the placeholder diff --git a/packages/flutter/test/widgets/gesture_detector_test.dart b/packages/flutter/test/widgets/gesture_detector_test.dart index bb4235d141..b7626870cb 100644 --- a/packages/flutter/test/widgets/gesture_detector_test.dart +++ b/packages/flutter/test/widgets/gesture_detector_test.dart @@ -225,7 +225,7 @@ void main() { }); testWidgets('cache unchanged callbacks', (WidgetTester tester) async { - final GestureTapCallback inputCallback = () {}; + final GestureTapCallback inputCallback = () { }; await tester.pumpWidget( Center( diff --git a/packages/flutter/test/widgets/list_wheel_scroll_view_test.dart b/packages/flutter/test/widgets/list_wheel_scroll_view_test.dart index d92dddaa09..ef28545a59 100644 --- a/packages/flutter/test/widgets/list_wheel_scroll_view_test.dart +++ b/packages/flutter/test/widgets/list_wheel_scroll_view_test.dart @@ -79,7 +79,7 @@ void main() { child: ListWheelScrollView.useDelegate( controller: controller, itemExtent: 100.0, - onSelectedItemChanged: (_) {}, + onSelectedItemChanged: (_) { }, childDelegate: ListWheelChildLoopingListDelegate( children: List.generate(10, (int index) { return Container( @@ -125,7 +125,7 @@ void main() { child: ListWheelScrollView.useDelegate( controller: controller, itemExtent: 100.0, - onSelectedItemChanged: (_) {}, + onSelectedItemChanged: (_) { }, childDelegate: ListWheelChildBuilderDelegate( builder: (BuildContext context, int index) { return Container( @@ -168,7 +168,7 @@ void main() { child: ListWheelScrollView.useDelegate( controller: controller, itemExtent: 100.0, - onSelectedItemChanged: (_) {}, + onSelectedItemChanged: (_) { }, childDelegate: ListWheelChildBuilderDelegate( builder: (BuildContext context, int index) { if (index < -15 || index > -5) @@ -287,7 +287,7 @@ void main() { child: ListWheelScrollView.useDelegate( controller: controller, itemExtent: 100.0, - onSelectedItemChanged: (_) {}, + onSelectedItemChanged: (_) { }, childDelegate: ListWheelChildBuilderDelegate( builder: (BuildContext context, int index) { expect(builtChildren.contains(index), false); @@ -323,7 +323,7 @@ void main() { child: ListWheelScrollView( controller: controller, itemExtent: 100.0, - onSelectedItemChanged: (_) {}, + onSelectedItemChanged: (_) { }, children: List.generate(16, (int index) { return Text(index.toString()); }), diff --git a/packages/flutter/test/widgets/platform_view_test.dart b/packages/flutter/test/widgets/platform_view_test.dart index 057ec20907..41726921bc 100644 --- a/packages/flutter/test/widgets/platform_view_test.dart +++ b/packages/flutter/test/widgets/platform_view_test.dart @@ -635,7 +635,7 @@ void main() { onVerticalDragStart: (DragStartDetails d) { verticalDragAcceptedByParent = true; }, - onLongPress: () {}, + onLongPress: () { }, child: const SizedBox( width: 200.0, height: 100.0, @@ -721,7 +721,7 @@ void main() { Align( alignment: Alignment.topLeft, child: GestureDetector( - onVerticalDragStart: (DragStartDetails d) {}, + onVerticalDragStart: (DragStartDetails d) { }, child: SizedBox( width: 200.0, height: 100.0, @@ -1253,7 +1253,7 @@ void main() { onVerticalDragStart: (DragStartDetails d) { verticalDragAcceptedByParent = true; }, - onLongPress: () {}, + onLongPress: () { }, child: const SizedBox( width: 200.0, height: 100.0, @@ -1332,7 +1332,7 @@ void main() { Align( alignment: Alignment.topLeft, child: GestureDetector( - onVerticalDragStart: (DragStartDetails d) {}, + onVerticalDragStart: (DragStartDetails d) { }, child: SizedBox( width: 200.0, height: 100.0, diff --git a/packages/flutter/test/widgets/semantics_test.dart b/packages/flutter/test/widgets/semantics_test.dart index 64dc727023..0ac8397250 100644 --- a/packages/flutter/test/widgets/semantics_test.dart +++ b/packages/flutter/test/widgets/semantics_test.dart @@ -639,7 +639,7 @@ void main() { final SemanticsHandle semantics = tester.ensureSemantics(); await tester.pumpWidget(Semantics( container: true, - onTap: () {}, + onTap: () { }, onTapHint: 'test', )); @@ -650,7 +650,7 @@ void main() { await tester.pumpWidget(Semantics( container: true, - onLongPress: () {}, + onLongPress: () { }, onLongPressHint: 'foo', )); @@ -666,8 +666,8 @@ void main() { await tester.pumpWidget(Semantics( container: true, customSemanticsActions: { - const CustomSemanticsAction(label: 'foo'): () {}, - const CustomSemanticsAction(label: 'bar'): () {}, + const CustomSemanticsAction(label: 'foo'): () { }, + const CustomSemanticsAction(label: 'bar'): () { }, }, )); @@ -691,8 +691,8 @@ void main() { value: '10s', increasedValue: '11s', decreasedValue: '9s', - onIncrease: () => () {}, - onDecrease: () => () {}, + onIncrease: () => () { }, + onDecrease: () => () { }, ), ), ); diff --git a/packages/flutter/test/widgets/semantics_tester_generateTestSemanticsExpressionForCurrentSemanticsTree_test.dart b/packages/flutter/test/widgets/semantics_tester_generateTestSemanticsExpressionForCurrentSemanticsTree_test.dart index 66e656cefc..d4b79e3718 100644 --- a/packages/flutter/test/widgets/semantics_tester_generateTestSemanticsExpressionForCurrentSemanticsTree_test.dart +++ b/packages/flutter/test/widgets/semantics_tester_generateTestSemanticsExpressionForCurrentSemanticsTree_test.dart @@ -30,8 +30,8 @@ void _tests() { Semantics( selected: true, checked: true, - onTap: () {}, - onDecrease: () {}, + onTap: () { }, + onDecrease: () { }, value: 'test-value', increasedValue: 'test-increasedValue', decreasedValue: 'test-decreasedValue', diff --git a/packages/flutter/test/widgets/text_test.dart b/packages/flutter/test/widgets/text_test.dart index 8943f11689..36b02fb65e 100644 --- a/packages/flutter/test/widgets/text_test.dart +++ b/packages/flutter/test/widgets/text_test.dart @@ -148,7 +148,7 @@ void main() { TextSpan( children: [ const TextSpan(text: 'hello '), - TextSpan(text: 'world', recognizer: TapGestureRecognizer()..onTap = () {}), + TextSpan(text: 'world', recognizer: TapGestureRecognizer()..onTap = () { }), const TextSpan(text: ' this is a '), const TextSpan(text: 'cat-astrophe'), ], @@ -193,9 +193,9 @@ void main() { style: textStyle, children: [ const TextSpan(text: 'hello world${Unicode.RLE}${Unicode.RLO} '), - TextSpan(text: 'BOY', recognizer: LongPressGestureRecognizer()..onLongPress = () {}), + TextSpan(text: 'BOY', recognizer: LongPressGestureRecognizer()..onLongPress = () { }), const TextSpan(text: ' HOW DO${Unicode.PDF} you ${Unicode.RLO} DO '), - TextSpan(text: 'SIR', recognizer: TapGestureRecognizer()..onTap = () {}), + TextSpan(text: 'SIR', recognizer: TapGestureRecognizer()..onTap = () { }), const TextSpan(text: '${Unicode.PDF}${Unicode.PDF} good bye'), ], ), diff --git a/packages/flutter_driver/lib/src/common/fuchsia_compat.dart b/packages/flutter_driver/lib/src/common/fuchsia_compat.dart index d5d3019b9a..bc62229170 100644 --- a/packages/flutter_driver/lib/src/common/fuchsia_compat.dart +++ b/packages/flutter_driver/lib/src/common/fuchsia_compat.dart @@ -26,7 +26,7 @@ class _DummyPortForwarder implements PortForwarder { int get remotePort => _remotePort; @override - Future stop() async {} + Future stop() async { } } class _DummySshCommandRunner implements SshCommandRunner { diff --git a/packages/flutter_driver/lib/src/driver/driver.dart b/packages/flutter_driver/lib/src/driver/driver.dart index 7152c8cd0c..1924dde6b0 100644 --- a/packages/flutter_driver/lib/src/driver/driver.dart +++ b/packages/flutter_driver/lib/src/driver/driver.dart @@ -416,7 +416,7 @@ class FlutterDriver { return response['response']; } - void _logCommunication(String message) { + void _logCommunication(String message) { if (_printCommunication) _log.info(message); if (_logCommunicationToFile) { diff --git a/packages/flutter_localizations/test/date_picker_test.dart b/packages/flutter_localizations/test/date_picker_test.dart index ff8f16faa7..5926462252 100644 --- a/packages/flutter_localizations/test/date_picker_test.dart +++ b/packages/flutter_localizations/test/date_picker_test.dart @@ -62,7 +62,7 @@ void main() { await _pumpBoilerplate(tester, DayPicker( selectedDate: baseDate, currentDate: baseDate, - onChanged: (DateTime newValue) {}, + onChanged: (DateTime newValue) { }, firstDate: baseDate.subtract(const Duration(days: 90)), lastDate: baseDate.add(const Duration(days: 90)), displayedMonth: baseDate, diff --git a/packages/flutter_test/lib/src/accessibility.dart b/packages/flutter_test/lib/src/accessibility.dart index 777a411f90..2d382c9693 100644 --- a/packages/flutter_test/lib/src/accessibility.dart +++ b/packages/flutter_test/lib/src/accessibility.dart @@ -197,7 +197,7 @@ class MinimumTextContrastGuideline extends AccessibilityGuideline { final RenderView renderView = tester.binding.renderView; final OffsetLayer layer = renderView.layer; ui.Image image; - final ByteData byteData = await tester.binding.runAsync(() async { + final ByteData byteData = await tester.binding.runAsync(() async { // Needs to be the same pixel ratio otherwise our dimensions won't match the // last transform layer. image = await layer.toImage(renderView.paintBounds, pixelRatio: 1.0); diff --git a/packages/flutter_test/lib/src/binding.dart b/packages/flutter_test/lib/src/binding.dart index 1a4bd3819c..767b1885b4 100644 --- a/packages/flutter_test/lib/src/binding.dart +++ b/packages/flutter_test/lib/src/binding.dart @@ -1530,22 +1530,22 @@ class _MockHttpClient implements HttpClient { String userAgent; @override - void addCredentials(Uri url, String realm, HttpClientCredentials credentials) {} + void addCredentials(Uri url, String realm, HttpClientCredentials credentials) { } @override - void addProxyCredentials(String host, int port, String realm, HttpClientCredentials credentials) {} + void addProxyCredentials(String host, int port, String realm, HttpClientCredentials credentials) { } @override - set authenticate(Future Function(Uri url, String scheme, String realm) f) {} + set authenticate(Future Function(Uri url, String scheme, String realm) f) { } @override - set authenticateProxy(Future Function(String host, int port, String scheme, String realm) f) {} + set authenticateProxy(Future Function(String host, int port, String scheme, String realm) f) { } @override - set badCertificateCallback(bool Function(X509Certificate cert, String host, int port) callback) {} + set badCertificateCallback(bool Function(X509Certificate cert, String host, int port) callback) { } @override - void close({ bool force = false }) {} + void close({ bool force = false }) { } @override Future delete(String host, int port, String path) { @@ -1558,7 +1558,7 @@ class _MockHttpClient implements HttpClient { } @override - set findProxy(String Function(Uri url) f) {} + set findProxy(String Function(Uri url) f) { } @override Future get(String host, int port, String path) { @@ -1630,10 +1630,10 @@ class _MockHttpRequest extends HttpClientRequest { final HttpHeaders headers = _MockHttpHeaders(); @override - void add(List data) {} + void add(List data) { } @override - void addError(Object error, [ StackTrace stackTrace ]) {} + void addError(Object error, [ StackTrace stackTrace ]) { } @override Future addStream(Stream> stream) { @@ -1666,16 +1666,16 @@ class _MockHttpRequest extends HttpClientRequest { Uri get uri => null; @override - void write(Object obj) {} + void write(Object obj) { } @override - void writeAll(Iterable objects, [ String separator = '' ]) {} + void writeAll(Iterable objects, [ String separator = '' ]) { } @override - void writeCharCode(int charCode) {} + void writeCharCode(int charCode) { } @override - void writeln([ Object obj = '' ]) {} + void writeln([ Object obj = '' ]) { } } /// A mocked [HttpClientResponse] which is empty and has a [statusCode] of 400. @@ -1732,25 +1732,25 @@ class _MockHttpHeaders extends HttpHeaders { List operator [](String name) => []; @override - void add(String name, Object value) {} + void add(String name, Object value) { } @override - void clear() {} + void clear() { } @override - void forEach(void Function(String name, List values) f) {} + void forEach(void Function(String name, List values) f) { } @override - void noFolding(String name) {} + void noFolding(String name) { } @override - void remove(String name, Object value) {} + void remove(String name, Object value) { } @override - void removeAll(String name) {} + void removeAll(String name) { } @override - void set(String name, Object value) {} + void set(String name, Object value) { } @override String value(String name) => null; diff --git a/packages/flutter_test/lib/src/test_compat.dart b/packages/flutter_test/lib/src/test_compat.dart index c987fecaef..860d65a50f 100644 --- a/packages/flutter_test/lib/src/test_compat.dart +++ b/packages/flutter_test/lib/src/test_compat.dart @@ -92,7 +92,7 @@ Future _runLiveTest(Suite suiteConfig, LiveTest liveTest, _Reporter report } Future _runSkippedTest(Suite suiteConfig, Test test, List parents, _Reporter reporter) async { - final LocalTest skipped = LocalTest(test.name, test.metadata, () {}, trace: test.trace); + final LocalTest skipped = LocalTest(test.name, test.metadata, () { }, trace: test.trace); if (skipped.metadata.skipReason != null) { print('Skip: ${skipped.metadata.skipReason}'); } diff --git a/packages/flutter_test/test/accessibility_test.dart b/packages/flutter_test/test/accessibility_test.dart index 0a36a426c6..284c17c70f 100644 --- a/packages/flutter_test/test/accessibility_test.dart +++ b/packages/flutter_test/test/accessibility_test.dart @@ -182,7 +182,7 @@ void main() { width: 48.0, height: 48.0, child: GestureDetector( - onTap: () {}, + onTap: () { }, ), ), )); @@ -197,7 +197,7 @@ void main() { width: 47.0, height: 48.0, child: GestureDetector( - onTap: () {}, + onTap: () { }, ), ), )); @@ -212,7 +212,7 @@ void main() { width: 48.0, height: 47.0, child: GestureDetector( - onTap: () {}, + onTap: () { }, ), ), )); @@ -229,7 +229,7 @@ void main() { width: 48.0, height: 48.0, child: GestureDetector( - onTap: () {}, + onTap: () { }, ), ), ), @@ -245,7 +245,7 @@ void main() { width: 48.0, height: 47.0, child: GestureDetector( - onTap: () {}, + onTap: () { }, ), ), )); @@ -264,7 +264,7 @@ void main() { width: 48.0, height: 47.0, child: GestureDetector( - onTap: () {}, + onTap: () { }, ), ); await tester.pumpWidget( @@ -347,7 +347,7 @@ void main() { child: Semantics( container: true, child: GestureDetector( - onTap: () {}, + onTap: () { }, child: const SizedBox(width: 4.0, height: 4.0), ), ), @@ -368,7 +368,7 @@ void main() { await tester.pumpWidget(_boilerplate(Semantics( container: true, child: const SizedBox(width: 10.0, height: 10.0), - onTap: () {}, + onTap: () { }, label: 'test', ))); final Evaluation result = await labeledTapTargetGuideline.evaluate(tester); @@ -380,7 +380,7 @@ void main() { await tester.pumpWidget(_boilerplate(Semantics( container: true, child: const SizedBox(width: 10.0, height: 10.0), - onLongPress: () {}, + onLongPress: () { }, label: '', ))); final Evaluation result = await labeledTapTargetGuideline.evaluate(tester); @@ -393,7 +393,7 @@ void main() { await tester.pumpWidget(_boilerplate(Semantics( container: true, child: const SizedBox(width: 10.0, height: 10.0), - onTap: () {}, + onTap: () { }, label: '', ))); final Evaluation result = await labeledTapTargetGuideline.evaluate(tester); @@ -405,7 +405,7 @@ void main() { final SemanticsHandle handle = tester.ensureSemantics(); await tester.pumpWidget(_boilerplate(Semantics( container: true, - onLongPress: () {}, + onLongPress: () { }, label: '', child: Semantics( label: 'test', diff --git a/packages/flutter_test/test/matchers_test.dart b/packages/flutter_test/test/matchers_test.dart index 82058b5250..10e677e071 100644 --- a/packages/flutter_test/test/matchers_test.dart +++ b/packages/flutter_test/test/matchers_test.dart @@ -393,8 +393,8 @@ void main() { namesRoute: true, header: true, button: true, - onTap: () {}, - onLongPress: () {}, + onTap: () { }, + onLongPress: () { }, label: 'foo', hint: 'bar', value: 'baz', @@ -404,8 +404,8 @@ void main() { onTapHint: 'scan', onLongPressHint: 'fill', customSemanticsActions: { - const CustomSemanticsAction(label: 'foo'): () {}, - const CustomSemanticsAction(label: 'bar'): () {}, + const CustomSemanticsAction(label: 'foo'): () { }, + const CustomSemanticsAction(label: 'bar'): () { }, }, )); diff --git a/packages/flutter_test/test/widget_tester_test.dart b/packages/flutter_test/test/widget_tester_test.dart index 1c578a58fe..2137652d5c 100644 --- a/packages/flutter_test/test/widget_tester_test.dart +++ b/packages/flutter_test/test/widget_tester_test.dart @@ -330,7 +330,7 @@ void main() { }); }); - group('pageBack', (){ + group('pageBack', () { testWidgets('fails when there are no back buttons', (WidgetTester tester) async { await tester.pumpWidget(Container()); @@ -492,7 +492,7 @@ void main() { testWidgets('disallows re-entry', (WidgetTester tester) async { final Completer completer = Completer(); tester.runAsync(() => completer.future); - expect(() => tester.runAsync(() async {}), throwsA(isInstanceOf())); + expect(() => tester.runAsync(() async { }), throwsA(isInstanceOf())); completer.complete(); }); @@ -573,7 +573,7 @@ void main() { home: Scaffold( body: Container( child: OutlineButton( - onPressed: () {}, + onPressed: () { }, child: const Text('hello'), ), ), diff --git a/packages/flutter_tools/lib/src/base/logger.dart b/packages/flutter_tools/lib/src/base/logger.dart index a004d6d6c3..97110d1e23 100644 --- a/packages/flutter_tools/lib/src/base/logger.dart +++ b/packages/flutter_tools/lib/src/base/logger.dart @@ -184,7 +184,7 @@ class StdoutLogger extends Logger { } @override - void printTrace(String message) {} + void printTrace(String message) { } @override Status startProgress( diff --git a/packages/flutter_tools/lib/src/commands/attach.dart b/packages/flutter_tools/lib/src/commands/attach.dart index a71524c9e6..eb3c4c09b4 100644 --- a/packages/flutter_tools/lib/src/commands/attach.dart +++ b/packages/flutter_tools/lib/src/commands/attach.dart @@ -272,7 +272,7 @@ class AttachCommand extends FlutterCommand { return null; } - Future _validateArguments() async {} + Future _validateArguments() async { } } class HotRunnerFactory { diff --git a/packages/flutter_tools/lib/src/compile.dart b/packages/flutter_tools/lib/src/compile.dart index a8cc83f5a3..5f936715f9 100644 --- a/packages/flutter_tools/lib/src/compile.dart +++ b/packages/flutter_tools/lib/src/compile.dart @@ -79,7 +79,7 @@ class StdoutHandler { void handler(String message) { const String kResultPrefix = 'result '; if (boundaryKey == null && message.startsWith(kResultPrefix)) { - boundaryKey = message.substring(kResultPrefix.length); + boundaryKey = message.substring(kResultPrefix.length); } else if (message.startsWith(boundaryKey)) { if (message.length <= boundaryKey.length) { compilerOutput.complete(null); diff --git a/packages/flutter_tools/lib/src/device.dart b/packages/flutter_tools/lib/src/device.dart index cad682f65b..f92fc2fee3 100644 --- a/packages/flutter_tools/lib/src/device.dart +++ b/packages/flutter_tools/lib/src/device.dart @@ -492,5 +492,5 @@ class NoOpDevicePortForwarder implements DevicePortForwarder { List get forwardedPorts => []; @override - Future unforward(ForwardedPort forwardedPort) async {} + Future unforward(ForwardedPort forwardedPort) async { } } diff --git a/packages/flutter_tools/lib/src/doctor.dart b/packages/flutter_tools/lib/src/doctor.dart index be1475f276..be0d09e660 100644 --- a/packages/flutter_tools/lib/src/doctor.dart +++ b/packages/flutter_tools/lib/src/doctor.dart @@ -312,7 +312,7 @@ class GroupedValidator extends DoctorValidator { String _currentSlowWarning = 'Initializing...'; @override - Future validate() async { + Future validate() async { final List tasks = []; for (DoctorValidator validator in subValidators) { tasks.add(ValidatorTask(validator, validator.validate())); diff --git a/packages/flutter_tools/lib/src/ios/code_signing.dart b/packages/flutter_tools/lib/src/ios/code_signing.dart index 5bda757968..183c90e406 100644 --- a/packages/flutter_tools/lib/src/ios/code_signing.dart +++ b/packages/flutter_tools/lib/src/ios/code_signing.dart @@ -95,7 +95,7 @@ final RegExp _certificateOrganizationalUnitExtractionPattern = RegExp(r'OU=([a-z Future> getCodeSigningIdentityDevelopmentTeam({ BuildableIOSApp iosApp, bool usesTerminalUi = true, -}) async{ +}) async { final Map buildSettings = iosApp.project.buildSettings; if (buildSettings == null) return null; diff --git a/packages/flutter_tools/lib/src/linux/linux_device.dart b/packages/flutter_tools/lib/src/linux/linux_device.dart index 316b1163ba..06c5301e71 100644 --- a/packages/flutter_tools/lib/src/linux/linux_device.dart +++ b/packages/flutter_tools/lib/src/linux/linux_device.dart @@ -14,7 +14,7 @@ class LinuxDevice extends Device { LinuxDevice() : super('Linux'); @override - void clearLogs() {} + void clearLogs() { } @override DeviceLogReader getLogReader({ ApplicationPackage app }) => NoOpDeviceLogReader('linux'); diff --git a/packages/flutter_tools/lib/src/macos/macos_device.dart b/packages/flutter_tools/lib/src/macos/macos_device.dart index 35cad44ef7..8e82cb7166 100644 --- a/packages/flutter_tools/lib/src/macos/macos_device.dart +++ b/packages/flutter_tools/lib/src/macos/macos_device.dart @@ -20,7 +20,7 @@ class MacOSDevice extends Device { MacOSDevice() : super('macOS'); @override - void clearLogs() {} + void clearLogs() { } @override DeviceLogReader getLogReader({ ApplicationPackage app }) => NoOpDeviceLogReader('macos'); diff --git a/packages/flutter_tools/lib/src/test/watcher.dart b/packages/flutter_tools/lib/src/test/watcher.dart index b442be3447..031a98c09b 100644 --- a/packages/flutter_tools/lib/src/test/watcher.dart +++ b/packages/flutter_tools/lib/src/test/watcher.dart @@ -11,20 +11,20 @@ abstract class TestWatcher { /// /// If startPaused was true, the caller needs to resume in Observatory to /// start running the tests. - void handleStartedProcess(ProcessEvent event) {} + void handleStartedProcess(ProcessEvent event) { } /// Called after the tests finish but before the process exits. /// /// The child process won't exit until this method completes. /// Not called if the process died. - Future handleFinishedTest(ProcessEvent event) async {} + Future handleFinishedTest(ProcessEvent event) async { } /// Called when the test process crashed before connecting to test harness. - Future handleTestCrashed(ProcessEvent event) async {} + Future handleTestCrashed(ProcessEvent event) async { } /// Called if we timed out waiting for the test process to connect to test /// harness. - Future handleTestTimedOut(ProcessEvent event) async {} + Future handleTestTimedOut(ProcessEvent event) async { } } /// Describes a child process started during testing. diff --git a/packages/flutter_tools/lib/src/tester/flutter_tester.dart b/packages/flutter_tools/lib/src/tester/flutter_tester.dart index 1e7d1cdf20..bfa2aeb6eb 100644 --- a/packages/flutter_tools/lib/src/tester/flutter_tester.dart +++ b/packages/flutter_tools/lib/src/tester/flutter_tester.dart @@ -65,7 +65,7 @@ class FlutterTesterDevice extends Device { Future get targetPlatform async => TargetPlatform.tester; @override - void clearLogs() {} + void clearLogs() { } final _FlutterTesterDeviceLogReader _logReader = _FlutterTesterDeviceLogReader(); diff --git a/packages/flutter_tools/lib/src/web/web_device.dart b/packages/flutter_tools/lib/src/web/web_device.dart index d98bb97e94..7c23bf48ba 100644 --- a/packages/flutter_tools/lib/src/web/web_device.dart +++ b/packages/flutter_tools/lib/src/web/web_device.dart @@ -61,7 +61,7 @@ class WebDevice extends Device { bool get supportsScreenshot => false; @override - void clearLogs() {} + void clearLogs() { } @override DeviceLogReader getLogReader({ApplicationPackage app}) { diff --git a/packages/flutter_tools/lib/src/windows/windows_device.dart b/packages/flutter_tools/lib/src/windows/windows_device.dart index 5698952b19..efe7783995 100644 --- a/packages/flutter_tools/lib/src/windows/windows_device.dart +++ b/packages/flutter_tools/lib/src/windows/windows_device.dart @@ -14,7 +14,7 @@ class WindowsDevice extends Device { WindowsDevice() : super('Windows'); @override - void clearLogs() {} + void clearLogs() { } @override DeviceLogReader getLogReader({ ApplicationPackage app }) => NoOpDeviceLogReader('windows'); diff --git a/packages/flutter_tools/test/application_package_test.dart b/packages/flutter_tools/test/application_package_test.dart index ff660ad3e1..7e173563aa 100644 --- a/packages/flutter_tools/test/application_package_test.dart +++ b/packages/flutter_tools/test/application_package_test.dart @@ -225,7 +225,7 @@ void main() { }, overrides: overrides); testUsingContext('Bad ipa zip-file, no payload dir', () { fs.file('app.ipa').createSync(); - when(os.unzip(fs.file('app.ipa'), any)).thenAnswer((Invocation _) {}); + when(os.unzip(fs.file('app.ipa'), any)).thenAnswer((Invocation _) { }); final PrebuiltIOSApp iosApp = IOSApp.fromPrebuiltApp(fs.file('app.ipa')); expect(iosApp, isNull); final BufferLogger logger = context[Logger]; diff --git a/packages/flutter_tools/test/compile_test.dart b/packages/flutter_tools/test/compile_test.dart index 5bef8cc30d..b149a2a844 100644 --- a/packages/flutter_tools/test/compile_test.dart +++ b/packages/flutter_tools/test/compile_test.dart @@ -334,8 +334,7 @@ example:org-dartlang-app:/ }); }); - group('compile expression', () - { + group('compile expression', () { ProcessManager mockProcessManager; ResidentCompiler generator; MockProcess mockFrontendServer; diff --git a/packages/flutter_tools/test/crash_reporting_test.dart b/packages/flutter_tools/test/crash_reporting_test.dart index 3d49ff244b..926ce871fb 100644 --- a/packages/flutter_tools/test/crash_reporting_test.dart +++ b/packages/flutter_tools/test/crash_reporting_test.dart @@ -210,32 +210,32 @@ class _NoopIOSink implements IOSink { set encoding(_) => throw UnsupportedError(''); @override - void add(_) {} + void add(_) { } @override - void write(_) {} + void write(_) { } @override - void writeAll(_, [ __ = '' ]) {} + void writeAll(_, [ __ = '' ]) { } @override - void writeln([ _ = '' ]) {} + void writeln([ _ = '' ]) { } @override - void writeCharCode(_) {} + void writeCharCode(_) { } @override - void addError(_, [ __ ]) {} + void addError(_, [ __ ]) { } @override - Future addStream(_) async {} + Future addStream(_) async { } @override - Future flush() async {} + Future flush() async { } @override - Future close() async {} + Future close() async { } @override - Future get done async {} + Future get done async { } } diff --git a/packages/flutter_tools/test/src/mocks.dart b/packages/flutter_tools/test/src/mocks.dart index b440e3f1d2..52c5fc9071 100644 --- a/packages/flutter_tools/test/src/mocks.dart +++ b/packages/flutter_tools/test/src/mocks.dart @@ -470,16 +470,16 @@ class MockDevFSOperations extends BasicMock implements DevFSOperations { class MockResidentCompiler extends BasicMock implements ResidentCompiler { @override - void accept() {} + void accept() { } @override Future reject() async { return null; } @override - void reset() {} + void reset() { } @override - Future shutdown() async {} + Future shutdown() async { } @override Future compileExpression( diff --git a/packages/flutter_tools/test/web/devices_test.dart b/packages/flutter_tools/test/web/devices_test.dart index 562e9bf6a4..5a843f524c 100644 --- a/packages/flutter_tools/test/web/devices_test.dart +++ b/packages/flutter_tools/test/web/devices_test.dart @@ -26,7 +26,7 @@ void main() { minify: anyNamed('minify'), enabledAssertions: anyNamed('enabledAssertions'), )).thenAnswer((Invocation invocation) async => 0); - when(mockChromeLauncher.launch(any)).thenAnswer((Invocation invocation) async {}); + when(mockChromeLauncher.launch(any)).thenAnswer((Invocation invocation) async { }); }); testUsingContext('can build and connect to chrome', () async {