fix bad indentations(mainly around collection literals) (#41355)
diff --git a/packages/flutter/test/cupertino/nav_bar_test.dart b/packages/flutter/test/cupertino/nav_bar_test.dart index 967d6cd..70204dc 100644 --- a/packages/flutter/test/cupertino/nav_bar_test.dart +++ b/packages/flutter/test/cupertino/nav_bar_test.dart
@@ -334,8 +334,8 @@ }); expect(opacities, <double> [ - 0.0, // Initially the smaller font title is invisible. - 1.0, // The larger font title is visible. + 0.0, // Initially the smaller font title is invisible. + 1.0, // The larger font title is visible. ]); expect(tester.getTopLeft(find.widgetWithText(OverflowBox, 'Title')).dy, 44.0); @@ -359,8 +359,8 @@ }); expect(opacities, <double> [ - 1.0, // Smaller font title now visible - 0.0, // Larger font title invisible. + 1.0, // Smaller font title now visible + 0.0, // Larger font title invisible. ]); // The persistent toolbar doesn't move or change size.
diff --git a/packages/flutter/test/cupertino/route_test.dart b/packages/flutter/test/cupertino/route_test.dart index 17e581f..33ada9b 100644 --- a/packages/flutter/test/cupertino/route_test.dart +++ b/packages/flutter/test/cupertino/route_test.dart
@@ -95,8 +95,8 @@ }); expect(opacities, <double> [ - 0.0, // Initially the smaller font title is invisible. - 1.0, // The larger font title is visible. + 0.0, // Initially the smaller font title is invisible. + 1.0, // The larger font title is visible. ]); // Check that the large font title is at the right spot.
diff --git a/packages/flutter/test/material/bottom_navigation_bar_test.dart b/packages/flutter/test/material/bottom_navigation_bar_test.dart index 7142e8c..f2be037 100644 --- a/packages/flutter/test/material/bottom_navigation_bar_test.dart +++ b/packages/flutter/test/material/bottom_navigation_bar_test.dart
@@ -1431,18 +1431,21 @@ testWidgets('BottomNavigationBar item title should not be nullable', (WidgetTester tester) async { expect(() { MaterialApp( - home: Scaffold( - bottomNavigationBar: BottomNavigationBar( - type: BottomNavigationBarType.shifting, - items: const <BottomNavigationBarItem>[ - BottomNavigationBarItem( - icon: Icon(Icons.ac_unit), - title: Text('AC'), - ), - BottomNavigationBarItem( - icon: Icon(Icons.access_alarm), - ), - ]))); + home: Scaffold( + bottomNavigationBar: BottomNavigationBar( + type: BottomNavigationBarType.shifting, + items: const <BottomNavigationBarItem>[ + BottomNavigationBarItem( + icon: Icon(Icons.ac_unit), + title: Text('AC'), + ), + BottomNavigationBarItem( + icon: Icon(Icons.access_alarm), + ), + ], + ), + ), + ); }, throwsA(isInstanceOf<AssertionError>())); });
diff --git a/packages/flutter/test/material/raw_material_button_test.dart b/packages/flutter/test/material/raw_material_button_test.dart index 4703bc3..4f07e66 100644 --- a/packages/flutter/test/material/raw_material_button_test.dart +++ b/packages/flutter/test/material/raw_material_button_test.dart
@@ -52,23 +52,25 @@ expect(semantics, hasSemantics( TestSemantics.root( children: <TestSemantics>[ - TestSemantics( - id: 1, - flags: <SemanticsFlag>[ - SemanticsFlag.isButton, - SemanticsFlag.hasEnabledState, - SemanticsFlag.isEnabled, - ], - actions: <SemanticsAction>[ - SemanticsAction.tap, - ], - label: '+', - textDirection: TextDirection.ltr, - rect: const Rect.fromLTRB(0.0, 0.0, 48.0, 48.0), - children: <TestSemantics>[], - ), - ] - ), ignoreTransform: true)); + TestSemantics( + id: 1, + flags: <SemanticsFlag>[ + SemanticsFlag.isButton, + SemanticsFlag.hasEnabledState, + SemanticsFlag.isEnabled, + ], + actions: <SemanticsAction>[ + SemanticsAction.tap, + ], + label: '+', + textDirection: TextDirection.ltr, + rect: const Rect.fromLTRB(0.0, 0.0, 48.0, 48.0), + children: <TestSemantics>[], + ), + ] + ), + ignoreTransform: true, + )); semantics.dispose(); });
diff --git a/packages/flutter/test/rendering/platform_view_test.dart b/packages/flutter/test/rendering/platform_view_test.dart index 763a390..2b9e273 100644 --- a/packages/flutter/test/rendering/platform_view_test.dart +++ b/packages/flutter/test/rendering/platform_view_test.dart
@@ -21,12 +21,13 @@ controller: fakePlatformViewController, hitTestBehavior: PlatformViewHitTestBehavior.opaque, gestureRecognizers: <Factory<OneSequenceGestureRecognizer>>{ - Factory<VerticalDragGestureRecognizer>( - () { - return VerticalDragGestureRecognizer(); - }, - ), - },); + Factory<VerticalDragGestureRecognizer>( + () { + return VerticalDragGestureRecognizer(); + }, + ), + }, + ); }); test('layout should size to max constraint', () {
diff --git a/packages/flutter/test/rendering/table_test.dart b/packages/flutter/test/rendering/table_test.dart index bae9252..dd17bbb 100644 --- a/packages/flutter/test/rendering/table_test.dart +++ b/packages/flutter/test/rendering/table_test.dart
@@ -176,15 +176,21 @@ final RenderBox child2 = RenderPositionedBox(); final RenderBox child3 = RenderPositionedBox(); table = RenderTable(textDirection: TextDirection.ltr); - table.setFlatChildren(3, <RenderBox>[child1, RenderPositionedBox(), child2, - RenderPositionedBox(), child3, RenderPositionedBox()]); + table.setFlatChildren(3, <RenderBox>[ + child1, RenderPositionedBox(), child2, + RenderPositionedBox(), child3, RenderPositionedBox(), + ]); expect(table.rows, equals(2)); layout(table); - table.setFlatChildren(3, <RenderBox>[RenderPositionedBox(), child1, RenderPositionedBox(), - child2, RenderPositionedBox(), child3]); + table.setFlatChildren(3, <RenderBox>[ + RenderPositionedBox(), child1, RenderPositionedBox(), + child2, RenderPositionedBox(), child3, + ]); pumpFrame(); - table.setFlatChildren(3, <RenderBox>[RenderPositionedBox(), child1, RenderPositionedBox(), - child2, RenderPositionedBox(), child3]); + table.setFlatChildren(3, <RenderBox>[ + RenderPositionedBox(), child1, RenderPositionedBox(), + child2, RenderPositionedBox(), child3, + ]); pumpFrame(); expect(table.columns, equals(3)); expect(table.rows, equals(2)); @@ -208,12 +214,16 @@ table.setFlatChildren(2, <RenderBox>[ RenderPositionedBox(), RenderPositionedBox() ]); pumpFrame(); expect(table, paints..path()..path()..path()..path()..path()); - table.setFlatChildren(2, <RenderBox>[ RenderPositionedBox(), RenderPositionedBox(), - RenderPositionedBox(), RenderPositionedBox() ]); + table.setFlatChildren(2, <RenderBox>[ + RenderPositionedBox(), RenderPositionedBox(), + RenderPositionedBox(), RenderPositionedBox(), + ]); pumpFrame(); expect(table, paints..path()..path()..path()..path()..path()..path()); - table.setFlatChildren(3, <RenderBox>[ RenderPositionedBox(), RenderPositionedBox(), RenderPositionedBox(), - RenderPositionedBox(), RenderPositionedBox(), RenderPositionedBox() ]); + table.setFlatChildren(3, <RenderBox>[ + RenderPositionedBox(), RenderPositionedBox(), RenderPositionedBox(), + RenderPositionedBox(), RenderPositionedBox(), RenderPositionedBox(), + ]); pumpFrame(); expect(table, paints..path()..path()..path()..path()..path()..path()); });
diff --git a/packages/flutter/test/services/message_codecs_test.dart b/packages/flutter/test/services/message_codecs_test.dart index b1aa34c..8b9190d 100644 --- a/packages/flutter/test/services/message_codecs_test.dart +++ b/packages/flutter/test/services/message_codecs_test.dart
@@ -148,8 +148,10 @@ checkEncoding<dynamic>( standard, 1.0, - <int>[6, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0xf0, 0x3f], + <int>[ + 6, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0xf0, 0x3f, + ], ); }); });
diff --git a/packages/flutter/test/widgets/draggable_test.dart b/packages/flutter/test/widgets/draggable_test.dart index b5f1697..69466a5 100644 --- a/packages/flutter/test/widgets/draggable_test.dart +++ b/packages/flutter/test/widgets/draggable_test.dart
@@ -158,18 +158,20 @@ onTap: () { events.add('tap'); }, - child: Container(child: const Text('Button'), + child: Container( + child: const Text('Button'), + ), ), - ), - DragTarget<int>( - builder: (BuildContext context, List<int> data, List<dynamic> rejects) { - return IgnorePointer( - child: Container(child: const Text('Target')), - ); - }, - onAccept: (int data) { - events.add('drop'); - }), + DragTarget<int>( + builder: (BuildContext context, List<int> data, List<dynamic> rejects) { + return IgnorePointer( + child: Container(child: const Text('Target')), + ); + }, + onAccept: (int data) { + events.add('drop'); + }, + ), ], ), ],
diff --git a/packages/flutter/test/widgets/navigator_test.dart b/packages/flutter/test/widgets/navigator_test.dart index c337ac9..7f78a74 100644 --- a/packages/flutter/test/widgets/navigator_test.dart +++ b/packages/flutter/test/widgets/navigator_test.dart
@@ -294,7 +294,7 @@ testWidgets('popAndPushNamed', (WidgetTester tester) async { final Map<String, WidgetBuilder> routes = <String, WidgetBuilder>{ - '/': (BuildContext context) => OnTapPage(id: '/', onTap: () { Navigator.pushNamed(context, '/A'); }), + '/' : (BuildContext context) => OnTapPage(id: '/', onTap: () { Navigator.pushNamed(context, '/A'); }), '/A': (BuildContext context) => OnTapPage(id: 'A', onTap: () { Navigator.popAndPushNamed(context, '/B'); }), '/B': (BuildContext context) => OnTapPage(id: 'B', onTap: () { Navigator.pop(context); }), }; @@ -321,7 +321,7 @@ testWidgets('Push and pop should trigger the observers', (WidgetTester tester) async { final Map<String, WidgetBuilder> routes = <String, WidgetBuilder>{ - '/': (BuildContext context) => OnTapPage(id: '/', onTap: () { Navigator.pushNamed(context, '/A'); }), + '/' : (BuildContext context) => OnTapPage(id: '/', onTap: () { Navigator.pushNamed(context, '/A'); }), '/A': (BuildContext context) => OnTapPage(id: 'A', onTap: () { Navigator.pop(context); }), }; bool isPushed = false; @@ -381,7 +381,7 @@ testWidgets('Add and remove an observer should work', (WidgetTester tester) async { final Map<String, WidgetBuilder> routes = <String, WidgetBuilder>{ - '/': (BuildContext context) => OnTapPage(id: '/', onTap: () { Navigator.pushNamed(context, '/A'); }), + '/' : (BuildContext context) => OnTapPage(id: '/', onTap: () { Navigator.pushNamed(context, '/A'); }), '/A': (BuildContext context) => OnTapPage(id: 'A', onTap: () { Navigator.pop(context); }), }; bool isPushed = false; @@ -428,7 +428,7 @@ testWidgets('replaceNamed', (WidgetTester tester) async { final Map<String, WidgetBuilder> routes = <String, WidgetBuilder>{ - '/': (BuildContext context) => OnTapPage(id: '/', onTap: () { Navigator.pushReplacementNamed(context, '/A'); }), + '/' : (BuildContext context) => OnTapPage(id: '/', onTap: () { Navigator.pushReplacementNamed(context, '/A'); }), '/A': (BuildContext context) => OnTapPage(id: 'A', onTap: () { Navigator.pushReplacementNamed(context, '/B'); }), '/B': (BuildContext context) => const OnTapPage(id: 'B'), }; @@ -452,7 +452,7 @@ Future<String> value; final Map<String, WidgetBuilder> routes = <String, WidgetBuilder>{ - '/': (BuildContext context) => OnTapPage(id: '/', onTap: () { Navigator.pushNamed(context, '/A'); }), + '/' : (BuildContext context) => OnTapPage(id: '/', onTap: () { Navigator.pushNamed(context, '/A'); }), '/A': (BuildContext context) => OnTapPage(id: 'A', onTap: () { value = Navigator.pushReplacementNamed(context, '/B', result: 'B'); }), '/B': (BuildContext context) => OnTapPage(id: 'B', onTap: () { Navigator.pop(context, 'B'); }), }; @@ -499,7 +499,7 @@ testWidgets('removeRoute', (WidgetTester tester) async { final Map<String, WidgetBuilder> pageBuilders = <String, WidgetBuilder>{ - '/': (BuildContext context) => OnTapPage(id: '/', onTap: () { Navigator.pushNamed(context, '/A'); }), + '/' : (BuildContext context) => OnTapPage(id: '/', onTap: () { Navigator.pushNamed(context, '/A'); }), '/A': (BuildContext context) => OnTapPage(id: 'A', onTap: () { Navigator.pushNamed(context, '/B'); }), '/B': (BuildContext context) => const OnTapPage(id: 'B'), }; @@ -683,7 +683,7 @@ testWidgets('didStartUserGesture observable', (WidgetTester tester) async { final Map<String, WidgetBuilder> routes = <String, WidgetBuilder>{ - '/': (BuildContext context) => OnTapPage(id: '/', onTap: () { Navigator.pushNamed(context, '/A'); }), + '/' : (BuildContext context) => OnTapPage(id: '/', onTap: () { Navigator.pushNamed(context, '/A'); }), '/A': (BuildContext context) => OnTapPage(id: 'A', onTap: () { Navigator.pop(context); }), };
diff --git a/packages/flutter/test/widgets/overscroll_indicator_test.dart b/packages/flutter/test/widgets/overscroll_indicator_test.dart index 794f7f9..c40f6c2 100644 --- a/packages/flutter/test/widgets/overscroll_indicator_test.dart +++ b/packages/flutter/test/widgets/overscroll_indicator_test.dart
@@ -72,7 +72,7 @@ width: 600.0, child: const CustomScrollView( slivers: <Widget>[ - SliverToBoxAdapter(child: SizedBox(height: 2000.0)), + SliverToBoxAdapter(child: SizedBox(height: 2000.0)), ], ), ),
diff --git a/packages/flutter/test/widgets/sliver_fill_remaining_test.dart b/packages/flutter/test/widgets/sliver_fill_remaining_test.dart index 0ebae1f..4050bc5 100644 --- a/packages/flutter/test/widgets/sliver_fill_remaining_test.dart +++ b/packages/flutter/test/widgets/sliver_fill_remaining_test.dart
@@ -104,11 +104,11 @@ testWidgets('scrolls beyond viewport by default', (WidgetTester tester) async { final ScrollController controller = ScrollController(); final List<Widget> slivers = <Widget>[ - sliverBox, - SliverFillRemaining( - child: Container(color: Colors.white), - ), - ]; + sliverBox, + SliverFillRemaining( + child: Container(color: Colors.white), + ), + ]; await tester.pumpWidget(boilerplate(slivers, controller: controller)); expect(controller.offset, 0.0); expect(find.byType(Container), findsNWidgets(2));
diff --git a/packages/flutter/test/widgets/sliver_semantics_test.dart b/packages/flutter/test/widgets/sliver_semantics_test.dart index c1ef222..c96e9c6 100644 --- a/packages/flutter/test/widgets/sliver_semantics_test.dart +++ b/packages/flutter/test/widgets/sliver_semantics_test.dart
@@ -55,7 +55,7 @@ expandedHeight: appBarExpandedHeight, title: Text('Semantics Test with Slivers'), ), - SliverList( + SliverList( delegate: SliverChildListDelegate(listChildren), ), ],
diff --git a/packages/flutter_tools/lib/src/build_runner/build_runner.dart b/packages/flutter_tools/lib/src/build_runner/build_runner.dart index f24174a..a6242c9 100644 --- a/packages/flutter_tools/lib/src/build_runner/build_runner.dart +++ b/packages/flutter_tools/lib/src/build_runner/build_runner.dart
@@ -163,8 +163,8 @@ '--packages=$scriptPackagesPath', buildSnapshot.path, 'daemon', - '--skip-build-script-check', - '--delete-conflicting-outputs', + '--skip-build-script-check', + '--delete-conflicting-outputs', ]; buildDaemonClient = await BuildDaemonClient.connect( flutterProject.directory.path,
diff --git a/packages/flutter_tools/lib/src/build_runner/build_script.dart b/packages/flutter_tools/lib/src/build_runner/build_script.dart index c5b8543..104d2c7 100644 --- a/packages/flutter_tools/lib/src/build_runner/build_script.dart +++ b/packages/flutter_tools/lib/src/build_runner/build_script.dart
@@ -58,8 +58,7 @@ 'video_player', }; -final DartPlatform flutterWebPlatform = - DartPlatform.register('flutter_web', <String>[ +final DartPlatform flutterWebPlatform = DartPlatform.register('flutter_web', <String>[ 'async', 'collection', 'convert', @@ -208,14 +207,14 @@ @override Map<String, List<String>> get buildExtensions => const <String, List<String>>{ - '.dart': <String>[ - ddcBootstrapExtension, - jsEntrypointExtension, - jsEntrypointSourceMapExtension, - jsEntrypointArchiveExtension, - digestsEntrypointExtension, - ], - }; + '.dart': <String>[ + ddcBootstrapExtension, + jsEntrypointExtension, + jsEntrypointSourceMapExtension, + jsEntrypointArchiveExtension, + digestsEntrypointExtension, + ], + }; @override Future<void> build(BuildStep buildStep) async { @@ -235,14 +234,14 @@ @override Map<String, List<String>> get buildExtensions => const <String, List<String>>{ - '.dart': <String>[ - ddcBootstrapExtension, - jsEntrypointExtension, - jsEntrypointSourceMapExtension, - jsEntrypointArchiveExtension, - digestsEntrypointExtension, - ], - }; + '.dart': <String>[ + ddcBootstrapExtension, + jsEntrypointExtension, + jsEntrypointSourceMapExtension, + jsEntrypointArchiveExtension, + digestsEntrypointExtension, + ], + }; @override Future<void> build(BuildStep buildStep) async {
diff --git a/packages/flutter_tools/lib/src/build_system/targets/dart.dart b/packages/flutter_tools/lib/src/build_system/targets/dart.dart index b3dc5c2..d8b3acd 100644 --- a/packages/flutter_tools/lib/src/build_system/targets/dart.dart +++ b/packages/flutter_tools/lib/src/build_system/targets/dart.dart
@@ -73,7 +73,7 @@ Source.artifact(Artifact.vmSnapshotData, mode: BuildMode.debug), Source.artifact(Artifact.isolateSnapshotData, mode: BuildMode.debug), Source.pattern('{BUILD_DIR}/app.dill'), - Source.behavior(AssetOutputBehavior()) + Source.behavior(AssetOutputBehavior()), ]; @override @@ -84,7 +84,7 @@ Source.pattern('{OUTPUT_DIR}/AssetManifest.json'), Source.pattern('{OUTPUT_DIR}/FontManifest.json'), Source.pattern('{OUTPUT_DIR}/LICENSE'), - Source.behavior(AssetOutputBehavior()) + Source.behavior(AssetOutputBehavior()), ]; @override @@ -157,7 +157,7 @@ Source.pattern('{OUTPUT_DIR}/AssetManifest.json'), Source.pattern('{OUTPUT_DIR}/FontManifest.json'), Source.pattern('{OUTPUT_DIR}/LICENSE'), - Source.behavior(AssetOutputBehavior()) + Source.behavior(AssetOutputBehavior()), ]; @override
diff --git a/packages/flutter_tools/lib/src/bundle.dart b/packages/flutter_tools/lib/src/bundle.dart index 6c3b6c9..6902a042 100644 --- a/packages/flutter_tools/lib/src/bundle.dart +++ b/packages/flutter_tools/lib/src/bundle.dart
@@ -163,7 +163,7 @@ kTargetFile: mainPath, kBuildMode: getNameForBuildMode(buildMode), kTargetPlatform: getNameForTargetPlatform(targetPlatform), - } + }, ); final Target target = buildMode == BuildMode.debug ? const CopyFlutterBundle()
diff --git a/packages/flutter_tools/lib/src/commands/unpack.dart b/packages/flutter_tools/lib/src/commands/unpack.dart index caa4436..6dfdc10 100644 --- a/packages/flutter_tools/lib/src/commands/unpack.dart +++ b/packages/flutter_tools/lib/src/commands/unpack.dart
@@ -12,8 +12,7 @@ import '../runner/flutter_command.dart'; /// The directory in the Flutter cache for each platform's artifacts. -const Map<TargetPlatform, String> flutterArtifactPlatformDirectory = - <TargetPlatform, String>{ +const Map<TargetPlatform, String> flutterArtifactPlatformDirectory = <TargetPlatform, String>{ TargetPlatform.linux_x64: 'linux-x64', TargetPlatform.darwin_x64: 'darwin-x64', TargetPlatform.windows_x64: 'windows-x64',
diff --git a/packages/flutter_tools/lib/src/doctor.dart b/packages/flutter_tools/lib/src/doctor.dart index 4aec079..dd932ba 100644 --- a/packages/flutter_tools/lib/src/doctor.dart +++ b/packages/flutter_tools/lib/src/doctor.dart
@@ -802,7 +802,7 @@ validators.add(ValidatorWithResult( userMessages.intellijMacUnknownResult, ValidationResult(ValidationType.missing, <ValidationMessage>[ - ValidationMessage.error(e.message), + ValidationMessage.error(e.message), ]), )); }
diff --git a/packages/flutter_tools/lib/src/test/flutter_web_platform.dart b/packages/flutter_tools/lib/src/test/flutter_web_platform.dart index 416b7d0..2281b98b 100644 --- a/packages/flutter_tools/lib/src/test/flutter_web_platform.dart +++ b/packages/flutter_tools/lib/src/test/flutter_web_platform.dart
@@ -245,11 +245,11 @@ _webSocketHandler.create(webSocketHandler(completer.complete)); final Uri webSocketUrl = url.replace(scheme: 'ws').resolve(path); final Uri hostUrl = url - .resolve('static/index.html') - .replace(queryParameters: <String, String>{ - 'managerUrl': webSocketUrl.toString(), - 'debug': _config.pauseAfterLoad.toString(), - }); + .resolve('static/index.html') + .replace(queryParameters: <String, String>{ + 'managerUrl': webSocketUrl.toString(), + 'debug': _config.pauseAfterLoad.toString(), + }); printTrace('Serving tests at $hostUrl'); @@ -559,8 +559,7 @@ Object message, { StackTraceMapper mapper, }) async { - url = url.replace( - fragment: Uri.encodeFull(jsonEncode(<String, Object>{ + url = url.replace(fragment: Uri.encodeFull(jsonEncode(<String, Object>{ 'metadata': suiteConfig.metadata.serialize(), 'browser': _runtime.identifier, })));
diff --git a/packages/flutter_tools/lib/src/version.dart b/packages/flutter_tools/lib/src/version.dart index 210f96e..c3d9364 100644 --- a/packages/flutter_tools/lib/src/version.dart +++ b/packages/flutter_tools/lib/src/version.dart
@@ -120,14 +120,14 @@ } Map<String, Object> toJson() => <String, Object>{ - 'frameworkVersion': frameworkVersion ?? 'unknown', - 'channel': channel, - 'repositoryUrl': repositoryUrl ?? 'unknown source', - 'frameworkRevision': frameworkRevision, - 'frameworkCommitDate': frameworkCommitDate, - 'engineRevision': engineRevision, - 'dartSdkVersion': dartSdkVersion, - }; + 'frameworkVersion': frameworkVersion ?? 'unknown', + 'channel': channel, + 'repositoryUrl': repositoryUrl ?? 'unknown source', + 'frameworkRevision': frameworkRevision, + 'frameworkCommitDate': frameworkCommitDate, + 'engineRevision': engineRevision, + 'dartSdkVersion': dartSdkVersion, + }; /// A date String describing the last framework commit. String get frameworkCommitDate => _latestGitCommitDate();
diff --git a/packages/flutter_tools/lib/src/vmservice.dart b/packages/flutter_tools/lib/src/vmservice.dart index e43d532..fbf6e6b 100644 --- a/packages/flutter_tools/lib/src/vmservice.dart +++ b/packages/flutter_tools/lib/src/vmservice.dart
@@ -331,8 +331,8 @@ Map<String, dynamic> params, ) { return Future.any<Map<String, dynamic>>(<Future<Map<String, dynamic>>>[ - _peer.sendRequest(method, params).then<Map<String, dynamic>>(castStringKeyedMap), - _connectionError.future, + _peer.sendRequest(method, params).then<Map<String, dynamic>>(castStringKeyedMap), + _connectionError.future, ]); }
diff --git a/packages/flutter_tools/test/general.shard/android/android_workflow_test.dart b/packages/flutter_tools/test/general.shard/android/android_workflow_test.dart index e2ddec5..3269e4f 100644 --- a/packages/flutter_tools/test/general.shard/android/android_workflow_test.dart +++ b/packages/flutter_tools/test/general.shard/android/android_workflow_test.dart
@@ -88,8 +88,8 @@ testUsingContext('licensesAccepted works for all licenses accepted', () async { when(sdk.sdkManagerPath).thenReturn('/foo/bar/sdkmanager'); processManager.processFactory = processMetaFactory(<String>[ - '[=======================================] 100% Computing updates... ', - 'All SDK package licenses accepted.', + '[=======================================] 100% Computing updates... ', + 'All SDK package licenses accepted.', ]); final AndroidLicenseValidator licenseValidator = AndroidLicenseValidator();
diff --git a/packages/flutter_tools/test/general.shard/android/gradle_test.dart b/packages/flutter_tools/test/general.shard/android/gradle_test.dart index d2ff5d6..a32bc5a 100644 --- a/packages/flutter_tools/test/general.shard/android/gradle_test.dart +++ b/packages/flutter_tools/test/general.shard/android/gradle_test.dart
@@ -1401,14 +1401,14 @@ expect(actualGradlewCall, contains('/path/to/project/.android/gradlew')); expect(actualGradlewCall, contains('-PlocalEngineOut=out/android_arm')); }, overrides: <Type, Generator>{ - AndroidSdk: () => mockAndroidSdk, - AndroidStudio: () => mockAndroidStudio, - Artifacts: () => mockArtifacts, - Cache: () => cache, - ProcessManager: () => mockProcessManager, - Platform: () => android, - FileSystem: () => fs, - }); + AndroidSdk: () => mockAndroidSdk, + AndroidStudio: () => mockAndroidStudio, + Artifacts: () => mockArtifacts, + Cache: () => cache, + ProcessManager: () => mockProcessManager, + Platform: () => android, + FileSystem: () => fs, + }); }); }
diff --git a/packages/flutter_tools/test/general.shard/base/build_test.dart b/packages/flutter_tools/test/general.shard/base/build_test.dart index 07758f3..99dd36f 100644 --- a/packages/flutter_tools/test/general.shard/base/build_test.dart +++ b/packages/flutter_tools/test/general.shard/base/build_test.dart
@@ -118,14 +118,15 @@ SnapshotType(TargetPlatform.android_x64, BuildMode.release), darwinArch: null, additionalArgs: <String>['--additional_arg']); - verify(mockProcessManager.start(<String>[ - 'gen_snapshot', - '--causal_async_stacks', - '--additional_arg' - ], - workingDirectory: anyNamed('workingDirectory'), - environment: anyNamed('environment'))) - .called(1); + verify(mockProcessManager.start( + <String>[ + 'gen_snapshot', + '--causal_async_stacks', + '--additional_arg', + ], + workingDirectory: anyNamed('workingDirectory'), + environment: anyNamed('environment'), + )).called(1); }, overrides: contextOverrides); testUsingContext('iOS armv7', () async { @@ -142,14 +143,15 @@ snapshotType: SnapshotType(TargetPlatform.ios, BuildMode.release), darwinArch: DarwinArch.armv7, additionalArgs: <String>['--additional_arg']); - verify(mockProcessManager.start(<String>[ - 'gen_snapshot_armv7', - '--causal_async_stacks', - '--additional_arg' - ], - workingDirectory: anyNamed('workingDirectory'), - environment: anyNamed('environment'))) - .called(1); + verify(mockProcessManager.start( + <String>[ + 'gen_snapshot_armv7', + '--causal_async_stacks', + '--additional_arg', + ], + workingDirectory: anyNamed('workingDirectory'), + environment: anyNamed('environment')), + ).called(1); }, overrides: contextOverrides); testUsingContext('iOS arm64', () async { @@ -166,14 +168,15 @@ snapshotType: SnapshotType(TargetPlatform.ios, BuildMode.release), darwinArch: DarwinArch.arm64, additionalArgs: <String>['--additional_arg']); - verify(mockProcessManager.start(<String>[ - 'gen_snapshot_arm64', - '--causal_async_stacks', - '--additional_arg' - ], - workingDirectory: anyNamed('workingDirectory'), - environment: anyNamed('environment'))) - .called(1); + verify(mockProcessManager.start( + <String>[ + 'gen_snapshot_arm64', + '--causal_async_stacks', + '--additional_arg', + ], + workingDirectory: anyNamed('workingDirectory'), + environment: anyNamed('environment'), + )).called(1); }, overrides: contextOverrides); testUsingContext('--strip filters outputs', () async { @@ -187,11 +190,12 @@ .thenAnswer((_) => Future<Process>.value(mockProc)); when(mockProc.stdout).thenAnswer((_) => const Stream<List<int>>.empty()); when(mockProc.stderr) - .thenAnswer((_) => Stream<String>.fromIterable(<String>[ - '--ABC\n', - 'Warning: Generating ELF library without DWARF debugging information.\n', - '--XYZ\n' - ]).transform<List<int>>(utf8.encoder)); + .thenAnswer((_) => Stream<String>.fromIterable(<String>[ + '--ABC\n', + 'Warning: Generating ELF library without DWARF debugging information.\n', + '--XYZ\n', + ]) + .transform<List<int>>(utf8.encoder)); await genSnapshot.run( snapshotType: SnapshotType(TargetPlatform.android_x64, BuildMode.release),
diff --git a/packages/flutter_tools/test/general.shard/build_system/targets/dart_test.dart b/packages/flutter_tools/test/general.shard/build_system/targets/dart_test.dart index d2bf170..050e217 100644 --- a/packages/flutter_tools/test/general.shard/build_system/targets/dart_test.dart +++ b/packages/flutter_tools/test/general.shard/build_system/targets/dart_test.dart
@@ -188,12 +188,12 @@ }); await const KernelSnapshot().build(Environment( - outputDir: fs.currentDirectory, - projectDir: fs.currentDirectory, - defines: <String, String>{ - kBuildMode: 'debug', - kTargetPlatform: getNameForTargetPlatform(TargetPlatform.android_arm), - })); + outputDir: fs.currentDirectory, + projectDir: fs.currentDirectory, + defines: <String, String>{ + kBuildMode: 'debug', + kTargetPlatform: getNameForTargetPlatform(TargetPlatform.android_arm), + })); }, overrides: <Type, Generator>{ KernelCompilerFactory: () => MockKernelCompilerFactory(), }));
diff --git a/packages/flutter_tools/test/general.shard/commands/build_linux_test.dart b/packages/flutter_tools/test/general.shard/commands/build_linux_test.dart index dec46e1..11bee6d 100644 --- a/packages/flutter_tools/test/general.shard/commands/build_linux_test.dart +++ b/packages/flutter_tools/test/general.shard/commands/build_linux_test.dart
@@ -170,7 +170,7 @@ expect(BuildLinuxCommand().hidden, true); }, overrides: <Type, Generator>{ FeatureFlags: () => TestFeatureFlags(isLinuxEnabled: false), - Platform: () => MockPlatform(), + Platform: () => MockPlatform(), }); testUsingContext('Not hidden when enabled and on Linux host', () {
diff --git a/packages/flutter_tools/test/general.shard/commands/build_macos_test.dart b/packages/flutter_tools/test/general.shard/commands/build_macos_test.dart index 7865826..33177d8 100644 --- a/packages/flutter_tools/test/general.shard/commands/build_macos_test.dart +++ b/packages/flutter_tools/test/general.shard/commands/build_macos_test.dart
@@ -187,7 +187,7 @@ expect(BuildMacosCommand().hidden, true); }, overrides: <Type, Generator>{ FeatureFlags: () => TestFeatureFlags(isMacOSEnabled: false), - Platform: () => MockPlatform(), + Platform: () => MockPlatform(), }); testUsingContext('Not hidden when enabled and on macOS host', () {
diff --git a/packages/flutter_tools/test/general.shard/commands/build_windows_test.dart b/packages/flutter_tools/test/general.shard/commands/build_windows_test.dart index 508db29..6605d7b 100644 --- a/packages/flutter_tools/test/general.shard/commands/build_windows_test.dart +++ b/packages/flutter_tools/test/general.shard/commands/build_windows_test.dart
@@ -181,7 +181,7 @@ expect(BuildWindowsCommand().hidden, true); }, overrides: <Type, Generator>{ FeatureFlags: () => TestFeatureFlags(isWindowsEnabled: false), - Platform: () => MockPlatform(), + Platform: () => MockPlatform(), }); testUsingContext('Not hidden when enabled and on Windows host', () {
diff --git a/packages/flutter_tools/test/general.shard/commands/precache_test.dart b/packages/flutter_tools/test/general.shard/commands/precache_test.dart index d9241c9..1b1fc25 100644 --- a/packages/flutter_tools/test/general.shard/commands/precache_test.dart +++ b/packages/flutter_tools/test/general.shard/commands/precache_test.dart
@@ -114,17 +114,17 @@ applyMocksToCommand(command); await createTestCommandRunner(command).run( const <String>[ - 'precache', - '--ios', - '--android_gen_snapshot', - '--android_maven', - '--android_internal_build', - '--web', - '--macos', - '--linux', - '--windows', - '--fuchsia', - '--flutter_runner', + 'precache', + '--ios', + '--android_gen_snapshot', + '--android_maven', + '--android_internal_build', + '--web', + '--macos', + '--linux', + '--windows', + '--fuchsia', + '--flutter_runner', ] ); expect(artifacts, unorderedEquals(<DevelopmentArtifact>{
diff --git a/packages/flutter_tools/test/general.shard/flutter_manifest_test.dart b/packages/flutter_tools/test/general.shard/flutter_manifest_test.dart index 8f5b7f8..ef3c910 100644 --- a/packages/flutter_tools/test/general.shard/flutter_manifest_test.dart +++ b/packages/flutter_tools/test/general.shard/flutter_manifest_test.dart
@@ -208,8 +208,8 @@ '''; final FlutterManifest flutterManifest = FlutterManifest.createFromString(manifest); final dynamic expectedFontsDescriptor = <dynamic>[ - {'fonts': [{'asset': 'a/bar'}, {'style': 'italic', 'weight': 400, 'asset': 'a/bar'}], 'family': 'foo'}, // ignore: always_specify_types - {'fonts': [{'asset': 'a/baz'}, {'style': 'italic', 'weight': 400, 'asset': 'a/baz'}], 'family': 'bar'}, // ignore: always_specify_types + {'fonts': [{'asset': 'a/bar'}, {'style': 'italic', 'weight': 400, 'asset': 'a/bar'}], 'family': 'foo'}, // ignore: always_specify_types + {'fonts': [{'asset': 'a/baz'}, {'style': 'italic', 'weight': 400, 'asset': 'a/baz'}], 'family': 'bar'}, // ignore: always_specify_types ]; expect(flutterManifest.fontsDescriptor, expectedFontsDescriptor); final List<Font> fonts = flutterManifest.fonts;
diff --git a/packages/flutter_tools/test/general.shard/ios/simulators_test.dart b/packages/flutter_tools/test/general.shard/ios/simulators_test.dart index 9093645..289c3af 100644 --- a/packages/flutter_tools/test/general.shard/ios/simulators_test.dart +++ b/packages/flutter_tools/test/general.shard/ios/simulators_test.dart
@@ -222,12 +222,12 @@ await deviceUnderTest.takeScreenshot(mockFile); verify(mockProcessManager.run( <String>[ - '/usr/bin/xcrun', - 'simctl', - 'io', - 'x', - 'screenshot', - fs.path.join('some', 'path', 'to', 'screenshot.png'), + '/usr/bin/xcrun', + 'simctl', + 'io', + 'x', + 'screenshot', + fs.path.join('some', 'path', 'to', 'screenshot.png'), ], environment: null, workingDirectory: null,
diff --git a/packages/flutter_tools/test/general.shard/ios/xcode_backend_test.dart b/packages/flutter_tools/test/general.shard/ios/xcode_backend_test.dart index 692cced..c2f63e8 100644 --- a/packages/flutter_tools/test/general.shard/ios/xcode_backend_test.dart +++ b/packages/flutter_tools/test/general.shard/ios/xcode_backend_test.dart
@@ -35,8 +35,7 @@ }; // Can't use a debug build with a profile engine. -const Map<String, String> localEngineProfileBuildeModeRelease = - <String, String>{ +const Map<String, String> localEngineProfileBuildeModeRelease = <String, String>{ 'SOURCE_ROOT': '../../../examples/hello_world', 'FLUTTER_ROOT': '../../..', 'LOCAL_ENGINE': '/engine/src/out/ios_profile',
diff --git a/packages/flutter_tools/test/general.shard/macos/cocoapods_test.dart b/packages/flutter_tools/test/general.shard/macos/cocoapods_test.dart index 163f848..c82c4cf 100644 --- a/packages/flutter_tools/test/general.shard/macos/cocoapods_test.dart +++ b/packages/flutter_tools/test/general.shard/macos/cocoapods_test.dart
@@ -174,9 +174,9 @@ testUsingContext('creates swift Podfile if swift', () async { when(mockXcodeProjectInterpreter.isInstalled).thenReturn(true); when(mockXcodeProjectInterpreter.getBuildSettings(any, any)) - .thenAnswer((_) async => <String, String>{ - 'SWIFT_VERSION': '4.0', - }); + .thenAnswer((_) async => <String, String>{ + 'SWIFT_VERSION': '4.0', + }); final FlutterProject project = FlutterProject.fromPath('project'); await cocoaPodsUnderTest.setupPodfile(project.ios);
diff --git a/packages/flutter_tools/test/general.shard/project_test.dart b/packages/flutter_tools/test/general.shard/project_test.dart index 3024d82..7b644be 100644 --- a/packages/flutter_tools/test/general.shard/project_test.dart +++ b/packages/flutter_tools/test/general.shard/project_test.dart
@@ -323,9 +323,9 @@ expect(await project.ios.isSwift, isTrue); expect(project.android.isKotlin, isTrue); }, overrides: <Type, Generator>{ - FileSystem: () => fs, - XcodeProjectInterpreter: () => mockXcodeProjectInterpreter, - FlutterProjectFactory: () => flutterProjectFactory, + FileSystem: () => fs, + XcodeProjectInterpreter: () => mockXcodeProjectInterpreter, + FlutterProjectFactory: () => flutterProjectFactory, }); });
diff --git a/packages/flutter_tools/test/general.shard/resident_web_runner_cold_test.dart b/packages/flutter_tools/test/general.shard/resident_web_runner_cold_test.dart index 97b1863..ddf23a1 100644 --- a/packages/flutter_tools/test/general.shard/resident_web_runner_cold_test.dart +++ b/packages/flutter_tools/test/general.shard/resident_web_runner_cold_test.dart
@@ -38,18 +38,19 @@ ); }, overrides: <Type, Generator>{ - WebFsFactory: () => ({ - @required String target, - @required FlutterProject flutterProject, - @required BuildInfo buildInfo, - @required bool skipDwds, - @required bool initializePlatform, - @required String hostname, - @required String port, - }) async { - return mockWebFs; + WebFsFactory: () => ({ + @required String target, + @required FlutterProject flutterProject, + @required BuildInfo buildInfo, + @required bool skipDwds, + @required bool initializePlatform, + @required String hostname, + @required String port, + }) async { + return mockWebFs; + }, }, - }); + ); }); void _setupMocks() {
diff --git a/packages/flutter_tools/test/general.shard/resident_web_runner_test.dart b/packages/flutter_tools/test/general.shard/resident_web_runner_test.dart index 4b7b5fc..c839508 100644 --- a/packages/flutter_tools/test/general.shard/resident_web_runner_test.dart +++ b/packages/flutter_tools/test/general.shard/resident_web_runner_test.dart
@@ -50,18 +50,19 @@ ); }, overrides: <Type, Generator>{ - WebFsFactory: () => ({ - @required String target, - @required FlutterProject flutterProject, - @required BuildInfo buildInfo, - @required bool skipDwds, - @required bool initializePlatform, - @required String hostname, - @required String port, - }) async { - return mockWebFs; + WebFsFactory: () => ({ + @required String target, + @required FlutterProject flutterProject, + @required BuildInfo buildInfo, + @required bool skipDwds, + @required bool initializePlatform, + @required String hostname, + @required String port, + }) async { + return mockWebFs; + }, }, - }); + ); }); void _setupMocks() {
diff --git a/packages/flutter_tools/test/general.shard/tester/flutter_tester_test.dart b/packages/flutter_tools/test/general.shard/tester/flutter_tester_test.dart index c0fac98..3da0f6b 100644 --- a/packages/flutter_tools/test/general.shard/tester/flutter_tester_test.dart +++ b/packages/flutter_tools/test/general.shard/tester/flutter_tester_test.dart
@@ -156,8 +156,7 @@ testUsingContext('start', () async { final Uri observatoryUri = Uri.parse('http://127.0.0.1:6666/'); - mockProcess = MockProcess( - stdout: Stream<List<int>>.fromIterable(<List<int>>[ + mockProcess = MockProcess(stdout: Stream<List<int>>.fromIterable(<List<int>>[ ''' Observatory listening on $observatoryUri Hello!
diff --git a/packages/flutter_tools/test/general.shard/windows/visual_studio_test.dart b/packages/flutter_tools/test/general.shard/windows/visual_studio_test.dart index f089d79..3ffe1e0 100644 --- a/packages/flutter_tools/test/general.shard/windows/visual_studio_test.dart +++ b/packages/flutter_tools/test/general.shard/windows/visual_studio_test.dart
@@ -43,7 +43,7 @@ 'isPrerelease': false, 'catalog': <String, dynamic>{ 'productDisplayVersion': '16.2.5', - } + }, }; // A version of a response that doesn't include certain installation status @@ -87,12 +87,12 @@ when(mockProcessManager.runSync( <String>[ vswherePath, - '-format', - 'json', - '-utf8', - '-latest', - ...?additionalArguments, - ...?requirementArguments, + '-format', + 'json', + '-utf8', + '-latest', + ...?additionalArguments, + ...?requirementArguments, ], workingDirectory: anyNamed('workingDirectory'), environment: anyNamed('environment'), @@ -415,7 +415,7 @@ 'installationVersion': '15.9.28307.665', 'catalog': <String, dynamic>{ 'productDisplayVersion': '15.9.12', - } + }, }; setMockCompatibleVisualStudioInstallation(olderButCompleteVersionResponse);
diff --git a/packages/flutter_tools/test/integration.shard/test_driver.dart b/packages/flutter_tools/test/integration.shard/test_driver.dart index 6a046b0..e2845eb 100644 --- a/packages/flutter_tools/test/integration.shard/test_driver.dart +++ b/packages/flutter_tools/test/integration.shard/test_driver.dart
@@ -620,11 +620,11 @@ Future<void> Function() beforeStart, }) async { await _setupProcess(<String>[ - 'test', - '--disable-service-auth-codes', - '--machine', - '-d', - 'flutter-tester', + 'test', + '--disable-service-auth-codes', + '--machine', + '-d', + 'flutter-tester', ], script: testFile, withDebugger: withDebugger, pauseOnExceptions: pauseOnExceptions, pidFile: pidFile, beforeStart: beforeStart); }