From 3800bb7b103e4cd282ad627fb6bbeacbebee1004 Mon Sep 17 00:00:00 2001 From: Alexandre Ardhuin Date: Wed, 22 Jan 2020 01:43:03 +0100 Subject: [PATCH] fix missing spaces in adjacent strings (#49159) --- ...print_correct_local_widget_expectation.txt | 2 +- .../print_correct_local_widget_test.dart | 2 +- .../language/sync_star_semantics_bench.dart | 2 +- dev/devicelab/bin/run.dart | 2 +- dev/devicelab/bin/tasks/module_test.dart | 2 +- dev/devicelab/bin/tasks/module_test_ios.dart | 4 +-- dev/snippets/test/snippets_test.dart | 3 +- dev/tools/gen_keycodes/bin/gen_keycodes.dart | 4 +-- dev/tools/localization/gen_l10n.dart | 2 +- dev/tools/vitool/lib/vitool.dart | 4 +-- .../lib/demo/fortnightly/fortnightly.dart | 2 +- .../demo/material/bottom_app_bar_demo.dart | 2 +- .../flutter/lib/src/gestures/hit_test.dart | 2 +- packages/flutter/lib/src/material/debug.dart | 2 +- .../flutter/lib/src/material/scaffold.dart | 4 +-- .../lib/src/material/toggle_buttons.dart | 2 +- .../flutter/lib/src/rendering/sliver.dart | 27 +++++++-------- .../lib/src/rendering/sliver_fill.dart | 12 +++---- .../lib/src/rendering/sliver_grid.dart | 13 ++++---- .../flutter/lib/src/rendering/viewport.dart | 2 +- .../lib/src/widgets/automatic_keep_alive.dart | 2 +- .../flutter/lib/src/widgets/media_query.dart | 33 ++++++++++--------- .../test/cupertino/tab_scaffold_test.dart | 4 +-- .../flutter/test/material/debug_test.dart | 2 +- .../test/material/expansion_panel_test.dart | 2 +- .../flutter/test/material/scaffold_test.dart | 4 +-- .../test/material/toggle_buttons_test.dart | 2 +- .../rendering/layer_annotations_test.dart | 4 +-- .../flutter/test/rendering/slivers_test.dart | 24 +++++++------- .../flutter/test/rendering/viewport_test.dart | 2 +- .../flutter/test/widgets/keep_alive_test.dart | 8 ++--- .../widgets/list_view_viewporting_test.dart | 4 +-- .../widgets/sliver_fill_viewport_test.dart | 8 ++--- .../widgets/slivers_appbar_pinned_test.dart | 4 +-- packages/flutter/test/widgets/text_test.dart | 3 +- .../lib/src/driver/vmservice_driver.dart | 2 +- .../lib/src/test_async_utils.dart | 22 ++++++------- .../flutter_test/test/controller_test.dart | 2 +- .../flutter_tools/lib/src/android/gradle.dart | 4 +-- .../lib/src/android/gradle_errors.dart | 3 +- packages/flutter_tools/lib/src/codegen.dart | 2 +- .../lib/src/commands/build_aar.dart | 2 +- .../lib/src/commands/build_web.dart | 2 +- .../lib/src/commands/create.dart | 6 ++-- .../lib/src/commands/ide_config.dart | 2 +- .../lib/src/commands/screenshot.dart | 2 +- .../lib/src/commands/update_packages.dart | 2 +- .../lib/src/commands/upgrade.dart | 6 ++-- .../lib/src/commands/version.dart | 4 +-- packages/flutter_tools/lib/src/convert.dart | 2 +- .../flutter_tools/lib/src/ios/bitcode.dart | 2 +- .../flutter_tools/lib/src/mdns_discovery.dart | 2 +- packages/flutter_tools/lib/src/plugins.dart | 4 +-- .../lib/src/runner/flutter_command.dart | 6 ++-- .../commands/build_aot_test.dart | 2 +- 55 files changed, 141 insertions(+), 139 deletions(-) diff --git a/dev/automated_tests/flutter_test/print_correct_local_widget_expectation.txt b/dev/automated_tests/flutter_test/print_correct_local_widget_expectation.txt index 33c3393318..ee2e517560 100644 --- a/dev/automated_tests/flutter_test/print_correct_local_widget_expectation.txt +++ b/dev/automated_tests/flutter_test/print_correct_local_widget_expectation.txt @@ -1,7 +1,7 @@ <> ══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════ The following assertion was thrown during layout: -A RenderFlex overflowed by 2844 pixels on the right\. +A RenderFlex overflowed by 2858 pixels on the right\. The relevant error-causing widget was: Row diff --git a/dev/automated_tests/flutter_test/print_correct_local_widget_test.dart b/dev/automated_tests/flutter_test/print_correct_local_widget_test.dart index 3f164f50e6..520ced82d3 100644 --- a/dev/automated_tests/flutter_test/print_correct_local_widget_test.dart +++ b/dev/automated_tests/flutter_test/print_correct_local_widget_test.dart @@ -26,7 +26,7 @@ void main() { children: const [ Text('Title'), Text( - 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed' + 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed ' 'do eiusmod tempor incididunt ut labore et dolore magna ' 'aliqua. Ut enim ad minim veniam, quis nostrud ' 'exercitation ullamco laboris nisi ut aliquip ex ea ' diff --git a/dev/benchmarks/microbenchmarks/lib/language/sync_star_semantics_bench.dart b/dev/benchmarks/microbenchmarks/lib/language/sync_star_semantics_bench.dart index 0672841bfd..bdd6860025 100644 --- a/dev/benchmarks/microbenchmarks/lib/language/sync_star_semantics_bench.dart +++ b/dev/benchmarks/microbenchmarks/lib/language/sync_star_semantics_bench.dart @@ -11,7 +11,7 @@ const int _kNumWarmUp = 100; void main() { final List words = 'Lorem Ipsum is simply dummy text of the printing and' - 'typesetting industry. Lorem Ipsum has been the industry\'s' + ' typesetting industry. Lorem Ipsum has been the industry\'s' ' standard dummy text ever since the 1500s, when an unknown' ' printer took a galley of type and scrambled it to make a' ' type specimen book'.split(' '); diff --git a/dev/devicelab/bin/run.dart b/dev/devicelab/bin/run.dart index cc2af6221c..61d0862c81 100644 --- a/dev/devicelab/bin/run.dart +++ b/dev/devicelab/bin/run.dart @@ -171,7 +171,7 @@ final ArgParser _argParser = ArgParser() defaultsTo: true, help: 'Only run tests that match the host platform (e.g. do not run a\n' 'test with a `required_agent_capabilities` value of "mac/android"\n' - 'on a windows host). Each test publishes its' + 'on a windows host). Each test publishes its ' '`required_agent_capabilities`\nin the `manifest.yaml` file.', ) ..addOption( diff --git a/dev/devicelab/bin/tasks/module_test.dart b/dev/devicelab/bin/tasks/module_test.dart index 48b09ef63c..ffe74e3864 100644 --- a/dev/devicelab/bin/tasks/module_test.dart +++ b/dev/devicelab/bin/tasks/module_test.dart @@ -220,7 +220,7 @@ Future main() async { || !analyticsOutput.contains('cd25: true') || !analyticsOutput.contains('viewName: assemble')) { return TaskResult.failure( - 'Building outer app produced the following analytics: "$analyticsOutput"' + 'Building outer app produced the following analytics: "$analyticsOutput" ' 'but not the expected strings: "cd24: android", "cd25: true" and ' '"viewName: assemble"' ); diff --git a/dev/devicelab/bin/tasks/module_test_ios.dart b/dev/devicelab/bin/tasks/module_test_ios.dart index 745614948a..04b75e63ad 100644 --- a/dev/devicelab/bin/tasks/module_test_ios.dart +++ b/dev/devicelab/bin/tasks/module_test_ios.dart @@ -285,7 +285,7 @@ Future main() async { || !objectiveCAnalyticsOutput.contains('cd25: true') || !objectiveCAnalyticsOutput.contains('viewName: build/bundle')) { return TaskResult.failure( - 'Building outer Objective-C app produced the following analytics: "$objectiveCAnalyticsOutput"' + 'Building outer Objective-C app produced the following analytics: "$objectiveCAnalyticsOutput" ' 'but not the expected strings: "cd24: ios", "cd25: true", "viewName: build/bundle"' ); } @@ -374,7 +374,7 @@ Future main() async { || !swiftAnalyticsOutput.contains('cd25: true') || !swiftAnalyticsOutput.contains('viewName: build/bundle')) { return TaskResult.failure( - 'Building outer Swift app produced the following analytics: "$swiftAnalyticsOutput"' + 'Building outer Swift app produced the following analytics: "$swiftAnalyticsOutput" ' 'but not the expected strings: "cd24: ios", "cd25: true", "viewName: build/bundle"' ); } diff --git a/dev/snippets/test/snippets_test.dart b/dev/snippets/test/snippets_test.dart index 18960c2640..edc3848d80 100644 --- a/dev/snippets/test/snippets_test.dart +++ b/dev/snippets/test/snippets_test.dart @@ -132,8 +132,7 @@ void main() { expect(html, contains('
HTML Bits
')); expect(html, contains('
More HTML Bits
')); expect(html, contains(' print('The actual \$name.');')); - expect(html, contains('
' - '{@end-inject-html}A description of the snippet.\n\n' + expect(html, contains('
{@end-inject-html}A description of the snippet.\n\n' 'On several lines.{@inject-html}
\n')); expect(html, contains('main() {')); }); diff --git a/dev/tools/gen_keycodes/bin/gen_keycodes.dart b/dev/tools/gen_keycodes/bin/gen_keycodes.dart index 511a09f152..014f3bfe12 100644 --- a/dev/tools/gen_keycodes/bin/gen_keycodes.dart +++ b/dev/tools/gen_keycodes/bin/gen_keycodes.dart @@ -102,7 +102,7 @@ Future main(List rawArguments) async { argParser.addOption( 'code', defaultsTo: path.join(flutterRoot.path, 'packages', 'flutter', 'lib', 'src', 'services', 'keyboard_key.dart'), - help: 'The path to where the output "keyboard_keys.dart" file should be' + help: 'The path to where the output "keyboard_keys.dart" file should be ' 'written. If --code is not specified, the output will be written to the ' 'correct directory in the flutter tree. If the output directory does not ' 'exist, it, and the path to it, will be created.', @@ -110,7 +110,7 @@ Future main(List rawArguments) async { argParser.addOption( 'maps', defaultsTo: path.join(flutterRoot.path, 'packages', 'flutter', 'lib', 'src', 'services', 'keyboard_maps.dart'), - help: 'The path to where the output "keyboard_maps.dart" file should be' + help: 'The path to where the output "keyboard_maps.dart" file should be ' 'written. If --maps is not specified, the output will be written to the ' 'correct directory in the flutter tree. If the output directory does not ' 'exist, it, and the path to it, will be created.', diff --git a/dev/tools/localization/gen_l10n.dart b/dev/tools/localization/gen_l10n.dart index 2c56d9f74f..966fe809aa 100644 --- a/dev/tools/localization/gen_l10n.dart +++ b/dev/tools/localization/gen_l10n.dart @@ -544,7 +544,7 @@ String genPluralMethod(Map arbBundle, String resourceId) { } String genSupportedLocaleProperty(Set supportedLocales) { - const String prefix = 'static const List supportedLocales = [\n Locale('''; + const String prefix = 'static const List supportedLocales = [\n Locale('; const String suffix = '),\n ];'; String resultingProperty = prefix; diff --git a/dev/tools/vitool/lib/vitool.dart b/dev/tools/vitool/lib/vitool.dart index bd0bdfe376..a8fdc4bdd5 100644 --- a/dev/tools/vitool/lib/vitool.dart +++ b/dev/tools/vitool/lib/vitool.dart @@ -87,8 +87,8 @@ class PathAnimation { final String currentCommandType = frame.paths[pathIdx].commands[commandIdx].type; if (commandType != currentCommandType) throw Exception( - 'Paths must be built from the same commands in all frames' - 'command $commandIdx at frame 0 was of type \'$commandType\'' + 'Paths must be built from the same commands in all frames ' + 'command $commandIdx at frame 0 was of type \'$commandType\' ' 'command $commandIdx at frame $i was of type \'$currentCommandType\'' ); for (int j = 0; j < numPointsInCommand; j += 1) diff --git a/examples/flutter_gallery/lib/demo/fortnightly/fortnightly.dart b/examples/flutter_gallery/lib/demo/fortnightly/fortnightly.dart index 90d43e4cff..3a5bbe2aaa 100644 --- a/examples/flutter_gallery/lib/demo/fortnightly/fortnightly.dart +++ b/examples/flutter_gallery/lib/demo/fortnightly/fortnightly.dart @@ -131,7 +131,7 @@ class FruitPage extends StatelessWidget { ), const SizedBox(height: 10), Text( - 'How these crazy fruits sweetened our hearts, relationships,' + 'How these crazy fruits sweetened our hearts, relationships, ' 'and puffed pastries', style: textTheme.body1, ), 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 f7127f397d..9c034fbfe5 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 @@ -90,7 +90,7 @@ class _BottomAppBarDemoState extends State { static void _showSnackbar() { const String text = "When the Scaffold's floating action button location changes, " - 'the floating action button animates to its new position.' + 'the floating action button animates to its new position. ' 'The BottomAppBar adapts its shape appropriately.'; _scaffoldKey.currentState.showSnackBar( const SnackBar(content: Text(text)), diff --git a/packages/flutter/lib/src/gestures/hit_test.dart b/packages/flutter/lib/src/gestures/hit_test.dart index d2f95d0519..e709d588ca 100644 --- a/packages/flutter/lib/src/gestures/hit_test.dart +++ b/packages/flutter/lib/src/gestures/hit_test.dart @@ -143,7 +143,7 @@ class HitTestResult { 'The third row and third column of a transform matrix for pointer ' 'events must be Vector4(0, 0, 1, 0) to ensure that a transformed ' 'point is directly under the pointer device. Did you forget to run the paint ' - 'matrix through PointerEvent.removePerspectiveTransform?' + 'matrix through PointerEvent.removePerspectiveTransform? ' 'The provided matrix is:\n$transform' ); _transforms.add(_transforms.isEmpty ? transform : (transform * _transforms.last as Matrix4)); diff --git a/packages/flutter/lib/src/material/debug.dart b/packages/flutter/lib/src/material/debug.dart index 2ac6086baf..fc5cc8830f 100644 --- a/packages/flutter/lib/src/material/debug.dart +++ b/packages/flutter/lib/src/material/debug.dart @@ -76,7 +76,7 @@ bool debugCheckHasMaterialLocalizations(BuildContext context) { 'to be provided by a Localizations widget ancestor.' ), ErrorDescription( - 'Localizations are used to generate many different messages, labels,' + 'Localizations are used to generate many different messages, labels, ' 'and abbreviations which are used by the material library.' ), ErrorHint( diff --git a/packages/flutter/lib/src/material/scaffold.dart b/packages/flutter/lib/src/material/scaffold.dart index 7eb637fb53..866d600f55 100644 --- a/packages/flutter/lib/src/material/scaffold.dart +++ b/packages/flutter/lib/src/material/scaffold.dart @@ -1755,7 +1755,7 @@ class ScaffoldState extends State with TickerProviderStateMixin { assert(() { if (widget.bottomSheet != null && isPersistent && _currentBottomSheet != null) { throw FlutterError( - 'Scaffold.bottomSheet cannot be specified while a bottom sheet' + 'Scaffold.bottomSheet cannot be specified while a bottom sheet ' 'displayed with showBottomSheet() is still visible.\n' 'Rebuild the Scaffold with a null bottomSheet before calling showBottomSheet().' ); @@ -1935,7 +1935,7 @@ class ScaffoldState extends State with TickerProviderStateMixin { assert(() { if (widget.bottomSheet != null) { throw FlutterError( - 'Scaffold.bottomSheet cannot be specified while a bottom sheet' + 'Scaffold.bottomSheet cannot be specified while a bottom sheet ' 'displayed with showBottomSheet() is still visible.\n' 'Rebuild the Scaffold with a null bottomSheet before calling showBottomSheet().' ); diff --git a/packages/flutter/lib/src/material/toggle_buttons.dart b/packages/flutter/lib/src/material/toggle_buttons.dart index 4c1d4ee3fd..1e6ea241c3 100644 --- a/packages/flutter/lib/src/material/toggle_buttons.dart +++ b/packages/flutter/lib/src/material/toggle_buttons.dart @@ -566,7 +566,7 @@ class ToggleButtons extends StatelessWidget { return true; }(), 'focusNodes.length must match children.length.\n' - 'There are ${focusNodes.length} focus nodes, while' + 'There are ${focusNodes.length} focus nodes, while ' 'there are ${children.length} children.' ); final ThemeData theme = Theme.of(context); diff --git a/packages/flutter/lib/src/rendering/sliver.dart b/packages/flutter/lib/src/rendering/sliver.dart index 9f5a922925..d56720c96b 100644 --- a/packages/flutter/lib/src/rendering/sliver.dart +++ b/packages/flutter/lib/src/rendering/sliver.dart @@ -503,19 +503,20 @@ class SliverConstraints extends Constraints { @override String toString() { - return 'SliverConstraints(' - '$axisDirection, ' - '$growthDirection, ' - '$userScrollDirection, ' - 'scrollOffset: ${scrollOffset.toStringAsFixed(1)}, ' - 'remainingPaintExtent: ${remainingPaintExtent.toStringAsFixed(1)}, ' + - (overlap != 0.0 ? 'overlap: ${overlap.toStringAsFixed(1)}, ' : '') + - 'crossAxisExtent: ${crossAxisExtent.toStringAsFixed(1)}, ' - 'crossAxisDirection: $crossAxisDirection, ' - 'viewportMainAxisExtent: ${viewportMainAxisExtent.toStringAsFixed(1)}, ' - 'remainingCacheExtent: ${remainingCacheExtent.toStringAsFixed(1)} ' - 'cacheOrigin: ${cacheOrigin.toStringAsFixed(1)} ' - ')'; + final List properties = [ + '$axisDirection', + '$growthDirection', + '$userScrollDirection', + 'scrollOffset: ${scrollOffset.toStringAsFixed(1)}', + 'remainingPaintExtent: ${remainingPaintExtent.toStringAsFixed(1)}', + if (overlap != 0.0) 'overlap: ${overlap.toStringAsFixed(1)}', + 'crossAxisExtent: ${crossAxisExtent.toStringAsFixed(1)}', + 'crossAxisDirection: $crossAxisDirection', + 'viewportMainAxisExtent: ${viewportMainAxisExtent.toStringAsFixed(1)}', + 'remainingCacheExtent: ${remainingCacheExtent.toStringAsFixed(1)}', + 'cacheOrigin: ${cacheOrigin.toStringAsFixed(1)}', + ]; + return 'SliverConstraints(${properties.join(', ')})'; } } diff --git a/packages/flutter/lib/src/rendering/sliver_fill.dart b/packages/flutter/lib/src/rendering/sliver_fill.dart index 3f3e28267e..066bd99d5e 100644 --- a/packages/flutter/lib/src/rendering/sliver_fill.dart +++ b/packages/flutter/lib/src/rendering/sliver_fill.dart @@ -163,9 +163,9 @@ class RenderSliverFillRemaining extends RenderSliverSingleBoxAdapter { } assert(extent.isFinite, - 'The calculated extent for the child of SliverFillRemaining is not finite.' - 'This can happen if the child is a scrollable, in which case, the' - 'hasScrollBody property of SliverFillRemaining should not be set to' + 'The calculated extent for the child of SliverFillRemaining is not finite. ' + 'This can happen if the child is a scrollable, in which case, the ' + 'hasScrollBody property of SliverFillRemaining should not be set to ' 'false.', ); final double paintedChildSize = calculatePaintOffset(constraints, from: 0.0, to: extent); @@ -239,9 +239,9 @@ class RenderSliverFillRemainingAndOverscroll extends RenderSliverSingleBoxAdapte } assert(extent.isFinite, - 'The calculated extent for the child of SliverFillRemaining is not finite.' - 'This can happen if the child is a scrollable, in which case, the' - 'hasScrollBody property of SliverFillRemaining should not be set to' + 'The calculated extent for the child of SliverFillRemaining is not finite. ' + 'This can happen if the child is a scrollable, in which case, the ' + 'hasScrollBody property of SliverFillRemaining should not be set to ' 'false.', ); final double paintedChildSize = calculatePaintOffset(constraints, from: 0.0, to: extent); diff --git a/packages/flutter/lib/src/rendering/sliver_grid.dart b/packages/flutter/lib/src/rendering/sliver_grid.dart index 0cb72b8fa6..be2351109b 100644 --- a/packages/flutter/lib/src/rendering/sliver_grid.dart +++ b/packages/flutter/lib/src/rendering/sliver_grid.dart @@ -71,12 +71,13 @@ class SliverGridGeometry { @override String toString() { - return 'SliverGridGeometry(' - 'scrollOffset: $scrollOffset, ' - 'crossAxisOffset: $crossAxisOffset, ' - 'mainAxisExtent: $mainAxisExtent, ' - 'crossAxisExtent: $crossAxisExtent' - ')'; + final List properties = [ + 'scrollOffset: $scrollOffset', + 'crossAxisOffset: $crossAxisOffset', + 'mainAxisExtent: $mainAxisExtent', + 'crossAxisExtent: $crossAxisExtent', + ]; + return 'SliverGridGeometry(${properties.join(', ')})'; } } diff --git a/packages/flutter/lib/src/rendering/viewport.dart b/packages/flutter/lib/src/rendering/viewport.dart index 5dd1642c1e..8dde2655f8 100644 --- a/packages/flutter/lib/src/rendering/viewport.dart +++ b/packages/flutter/lib/src/rendering/viewport.dart @@ -1270,7 +1270,7 @@ class RenderViewport extends RenderViewportBase[ ErrorSummary('Horizontal viewport was given unbounded width.'), ErrorDescription( - 'Viewports expand in the scrolling direction to fill their container.' + 'Viewports expand in the scrolling direction to fill their container. ' 'In this case, a horizontal viewport was given an unlimited amount of ' 'horizontal space in which to expand. This situation typically happens ' 'when a scrollable widget is nested inside another scrollable widget.' diff --git a/packages/flutter/lib/src/widgets/automatic_keep_alive.dart b/packages/flutter/lib/src/widgets/automatic_keep_alive.dart index e6a443e5e1..81f61d1225 100644 --- a/packages/flutter/lib/src/widgets/automatic_keep_alive.dart +++ b/packages/flutter/lib/src/widgets/automatic_keep_alive.dart @@ -145,7 +145,7 @@ class _AutomaticKeepAliveState extends State { assert(() { if (!mounted) { throw FlutterError( - 'AutomaticKeepAlive handle triggered after AutomaticKeepAlive was disposed.' + 'AutomaticKeepAlive handle triggered after AutomaticKeepAlive was disposed. ' 'Widgets should always trigger their KeepAliveNotification handle when they are ' 'deactivated, so that they (or their handle) do not send spurious events later ' 'when they are no longer in the tree.' diff --git a/packages/flutter/lib/src/widgets/media_query.dart b/packages/flutter/lib/src/widgets/media_query.dart index 004ca3801e..1809a8a561 100644 --- a/packages/flutter/lib/src/widgets/media_query.dart +++ b/packages/flutter/lib/src/widgets/media_query.dart @@ -574,22 +574,23 @@ class MediaQueryData { @override String toString() { - return '${objectRuntimeType(this, 'MediaQueryData')}(' - 'size: $size, ' - 'devicePixelRatio: ${devicePixelRatio.toStringAsFixed(1)}, ' - 'textScaleFactor: ${textScaleFactor.toStringAsFixed(1)}, ' - 'platformBrightness: $platformBrightness, ' - 'padding: $padding, ' - 'viewPadding: $viewPadding, ' - 'viewInsets: $viewInsets, ' - 'physicalDepth: $physicalDepth, ' - 'alwaysUse24HourFormat: $alwaysUse24HourFormat, ' - 'accessibleNavigation: $accessibleNavigation, ' - 'highContrast: $highContrast,' - 'disableAnimations: $disableAnimations, ' - 'invertColors: $invertColors, ' - 'boldText: $boldText' - ')'; + final List properties = [ + 'size: $size', + 'devicePixelRatio: ${devicePixelRatio.toStringAsFixed(1)}', + 'textScaleFactor: ${textScaleFactor.toStringAsFixed(1)}', + 'platformBrightness: $platformBrightness', + 'padding: $padding', + 'viewPadding: $viewPadding', + 'viewInsets: $viewInsets', + 'physicalDepth: $physicalDepth', + 'alwaysUse24HourFormat: $alwaysUse24HourFormat', + 'accessibleNavigation: $accessibleNavigation', + 'highContrast: $highContrast', + 'disableAnimations: $disableAnimations', + 'invertColors: $invertColors', + 'boldText: $boldText', + ]; + return '${objectRuntimeType(this, 'MediaQueryData')}(${properties.join(', ')})'; } } diff --git a/packages/flutter/test/cupertino/tab_scaffold_test.dart b/packages/flutter/test/cupertino/tab_scaffold_test.dart index d909f380da..b11c7e46ac 100644 --- a/packages/flutter/test/cupertino/tab_scaffold_test.dart +++ b/packages/flutter/test/cupertino/tab_scaffold_test.dart @@ -724,7 +724,7 @@ void main() { expect(tabsPainted, const [0, 0, 1]); }); - testWidgets('Do not call dispose on a controller that we do not own' + testWidgets('Do not call dispose on a controller that we do not own ' 'but do remove from its listeners when done listening to it', (WidgetTester tester) async { final MockCupertinoTabController mockController = MockCupertinoTabController(initialIndex: 0); @@ -798,7 +798,7 @@ void main() { expect(find.text('Tab 3'), findsNothing); }); - testWidgets('A controller can control more than one CupertinoTabScaffold,' + testWidgets('A controller can control more than one CupertinoTabScaffold, ' 'removal of listeners does not break the controller', (WidgetTester tester) async { final List tabsPainted0 = []; diff --git a/packages/flutter/test/material/debug_test.dart b/packages/flutter/test/material/debug_test.dart index 3c8c53a7d7..8ab0c9a9f6 100644 --- a/packages/flutter/test/material/debug_test.dart +++ b/packages/flutter/test/material/debug_test.dart @@ -68,7 +68,7 @@ void main() { ' BackButton widgets require MaterialLocalizations to be provided\n' ' by a Localizations widget ancestor.\n' ' Localizations are used to generate many different messages,\n' - ' labels,and abbreviations which are used by the material library.\n' + ' labels, and abbreviations which are used by the material library.\n' ' To introduce a MaterialLocalizations, either use a MaterialApp at\n' ' the root of your application to include them automatically, or\n' ' add a Localization widget with a MaterialLocalizations delegate.\n' diff --git a/packages/flutter/test/material/expansion_panel_test.dart b/packages/flutter/test/material/expansion_panel_test.dart index 139a2b5a8e..f0dde99ed8 100644 --- a/packages/flutter/test/material/expansion_panel_test.dart +++ b/packages/flutter/test/material/expansion_panel_test.dart @@ -649,7 +649,7 @@ void main() { }); testWidgets( - 'didUpdateWidget accounts for toggling between ExpansionPanelList' + 'didUpdateWidget accounts for toggling between ExpansionPanelList ' 'and ExpansionPaneList.radio', (WidgetTester tester) async { bool isRadioList = false; diff --git a/packages/flutter/test/material/scaffold_test.dart b/packages/flutter/test/material/scaffold_test.dart index d3d379839a..a1017152d0 100644 --- a/packages/flutter/test/material/scaffold_test.dart +++ b/packages/flutter/test/material/scaffold_test.dart @@ -1720,8 +1720,8 @@ void main() { expect(error, isNotNull); expect(error.toStringDeep(), equalsIgnoringHashCodes( 'FlutterError\n' - ' Scaffold.bottomSheet cannot be specified while a bottom\n' - ' sheetdisplayed with showBottomSheet() is still visible.\n' + ' Scaffold.bottomSheet cannot be specified while a bottom sheet\n' + ' displayed with showBottomSheet() is still visible.\n' ' Rebuild the Scaffold with a null bottomSheet before calling\n' ' showBottomSheet().\n', )); diff --git a/packages/flutter/test/material/toggle_buttons_test.dart b/packages/flutter/test/material/toggle_buttons_test.dart index 40ff0c138a..6bef7abd9e 100644 --- a/packages/flutter/test/material/toggle_buttons_test.dart +++ b/packages/flutter/test/material/toggle_buttons_test.dart @@ -228,7 +228,7 @@ void main() { ), ), ); - fail('Should not be possible to create a toggle button with mismatching' + fail('Should not be possible to create a toggle button with mismatching ' 'children.length and isSelected.length.'); } on AssertionError catch (e) { expect(e.toString(), contains('children.length')); diff --git a/packages/flutter/test/rendering/layer_annotations_test.dart b/packages/flutter/test/rendering/layer_annotations_test.dart index b3bd5d1adb..832d8ffe83 100644 --- a/packages/flutter/test/rendering/layer_annotations_test.dart +++ b/packages/flutter/test/rendering/layer_annotations_test.dart @@ -491,7 +491,7 @@ void main() { ); }); - test('AnnotatedRegionLayer.findAllAnnotations should still check children and return' + test('AnnotatedRegionLayer.findAllAnnotations should still check children and return ' 'children\'s opacity (false) during a failed hit', () { const Offset position = Offset(5, 5); @@ -513,7 +513,7 @@ void main() { ); }); - test('AnnotatedRegionLayer.findAllAnnotations should still check children and return' + test('AnnotatedRegionLayer.findAllAnnotations should still check children and return ' 'children\'s opacity (true) during a failed hit', () { const Offset position = Offset(5, 5); diff --git a/packages/flutter/test/rendering/slivers_test.dart b/packages/flutter/test/rendering/slivers_test.dart index 5cf1901041..75a3340bb4 100644 --- a/packages/flutter/test/rendering/slivers_test.dart +++ b/packages/flutter/test/rendering/slivers_test.dart @@ -92,8 +92,8 @@ void main() { ' │ │ GrowthDirection.forward, ScrollDirection.idle, scrollOffset:\n' ' │ │ 0.0, remainingPaintExtent: 600.0, crossAxisExtent: 800.0,\n' ' │ │ crossAxisDirection: AxisDirection.right,\n' - ' │ │ viewportMainAxisExtent: 600.0, remainingCacheExtent: 850.0\n' - ' │ │ cacheOrigin: 0.0 )\n' + ' │ │ viewportMainAxisExtent: 600.0, remainingCacheExtent: 850.0,\n' + ' │ │ cacheOrigin: 0.0)\n' ' │ │ geometry: SliverGeometry(scrollExtent: 400.0, paintExtent: 400.0,\n' ' │ │ maxPaintExtent: 400.0, cacheExtent: 400.0)\n' ' │ │\n' @@ -108,8 +108,8 @@ void main() { ' │ │ GrowthDirection.forward, ScrollDirection.idle, scrollOffset:\n' ' │ │ 0.0, remainingPaintExtent: 200.0, crossAxisExtent: 800.0,\n' ' │ │ crossAxisDirection: AxisDirection.right,\n' - ' │ │ viewportMainAxisExtent: 600.0, remainingCacheExtent: 450.0\n' - ' │ │ cacheOrigin: 0.0 )\n' + ' │ │ viewportMainAxisExtent: 600.0, remainingCacheExtent: 450.0,\n' + ' │ │ cacheOrigin: 0.0)\n' ' │ │ geometry: SliverGeometry(scrollExtent: 400.0, paintExtent: 200.0,\n' ' │ │ maxPaintExtent: 400.0, hasVisualOverflow: true, cacheExtent:\n' ' │ │ 400.0)\n' @@ -125,8 +125,8 @@ void main() { ' │ │ GrowthDirection.forward, ScrollDirection.idle, scrollOffset:\n' ' │ │ 0.0, remainingPaintExtent: 0.0, crossAxisExtent: 800.0,\n' ' │ │ crossAxisDirection: AxisDirection.right,\n' - ' │ │ viewportMainAxisExtent: 600.0, remainingCacheExtent: 50.0\n' - ' │ │ cacheOrigin: 0.0 )\n' + ' │ │ viewportMainAxisExtent: 600.0, remainingCacheExtent: 50.0,\n' + ' │ │ cacheOrigin: 0.0)\n' ' │ │ geometry: SliverGeometry(scrollExtent: 400.0, hidden,\n' ' │ │ maxPaintExtent: 400.0, hasVisualOverflow: true, cacheExtent:\n' ' │ │ 50.0)\n' @@ -142,8 +142,8 @@ void main() { ' │ │ GrowthDirection.forward, ScrollDirection.idle, scrollOffset:\n' ' │ │ 0.0, remainingPaintExtent: 0.0, crossAxisExtent: 800.0,\n' ' │ │ crossAxisDirection: AxisDirection.right,\n' - ' │ │ viewportMainAxisExtent: 600.0, remainingCacheExtent: 0.0\n' - ' │ │ cacheOrigin: 0.0 )\n' + ' │ │ viewportMainAxisExtent: 600.0, remainingCacheExtent: 0.0,\n' + ' │ │ cacheOrigin: 0.0)\n' ' │ │ geometry: SliverGeometry(scrollExtent: 400.0, hidden,\n' ' │ │ maxPaintExtent: 400.0, hasVisualOverflow: true)\n' ' │ │\n' @@ -158,8 +158,8 @@ void main() { ' │ GrowthDirection.forward, ScrollDirection.idle, scrollOffset:\n' ' │ 0.0, remainingPaintExtent: 0.0, crossAxisExtent: 800.0,\n' ' │ crossAxisDirection: AxisDirection.right,\n' - ' │ viewportMainAxisExtent: 600.0, remainingCacheExtent: 0.0\n' - ' │ cacheOrigin: 0.0 )\n' + ' │ viewportMainAxisExtent: 600.0, remainingCacheExtent: 0.0,\n' + ' │ cacheOrigin: 0.0)\n' ' │ geometry: SliverGeometry(scrollExtent: 400.0, hidden,\n' ' │ maxPaintExtent: 400.0, hasVisualOverflow: true)\n' ' │\n' @@ -956,7 +956,7 @@ void main() { ' The "precedingScrollExtent" is NaN, expected greater than or equal to zero.\n' ' The constraints are not normalized.\n' 'The offending constraints were:\n' - ' SliverConstraints(AxisDirection.down, GrowthDirection.forward, ScrollDirection.idle, scrollOffset: NaN, remainingPaintExtent: NaN, overlap: NaN, crossAxisExtent: NaN, crossAxisDirection: AxisDirection.left, viewportMainAxisExtent: NaN, remainingCacheExtent: NaN cacheOrigin: NaN )', + ' SliverConstraints(AxisDirection.down, GrowthDirection.forward, ScrollDirection.idle, scrollOffset: NaN, remainingPaintExtent: NaN, overlap: NaN, crossAxisExtent: NaN, crossAxisDirection: AxisDirection.left, viewportMainAxisExtent: NaN, remainingCacheExtent: NaN, cacheOrigin: NaN)', ); threw = true; } @@ -992,7 +992,7 @@ void main() { ' The "precedingScrollExtent" is negative.\n' ' The constraints are not normalized.\n' 'The offending constraints were:\n' - ' SliverConstraints(AxisDirection.down, GrowthDirection.forward, ScrollDirection.idle, scrollOffset: -1.0, remainingPaintExtent: -1.0, crossAxisExtent: 0.0, crossAxisDirection: AxisDirection.left, viewportMainAxisExtent: 0.0, remainingCacheExtent: -1.0 cacheOrigin: 1.0 )', + ' SliverConstraints(AxisDirection.down, GrowthDirection.forward, ScrollDirection.idle, scrollOffset: -1.0, remainingPaintExtent: -1.0, crossAxisExtent: 0.0, crossAxisDirection: AxisDirection.left, viewportMainAxisExtent: 0.0, remainingCacheExtent: -1.0, cacheOrigin: 1.0)', ); threw = true; } diff --git a/packages/flutter/test/rendering/viewport_test.dart b/packages/flutter/test/rendering/viewport_test.dart index c0c641ecab..83391b7f83 100644 --- a/packages/flutter/test/rendering/viewport_test.dart +++ b/packages/flutter/test/rendering/viewport_test.dart @@ -1047,7 +1047,7 @@ void main() { 'FlutterError\n' ' Horizontal viewport was given unbounded width.\n' ' Viewports expand in the scrolling direction to fill their\n' - ' container.In this case, a horizontal viewport was given an\n' + ' container. In this case, a horizontal viewport was given an\n' ' unlimited amount of horizontal space in which to expand. This\n' ' situation typically happens when a scrollable widget is nested\n' ' inside another scrollable widget.\n' diff --git a/packages/flutter/test/widgets/keep_alive_test.dart b/packages/flutter/test/widgets/keep_alive_test.dart index 99477deeea..8875e6db05 100644 --- a/packages/flutter/test/widgets/keep_alive_test.dart +++ b/packages/flutter/test/widgets/keep_alive_test.dart @@ -299,8 +299,8 @@ void main() { ' │ GrowthDirection.forward, ScrollDirection.idle, scrollOffset:\n' ' │ 0.0, remainingPaintExtent: 600.0, crossAxisExtent: 800.0,\n' ' │ crossAxisDirection: AxisDirection.right,\n' - ' │ viewportMainAxisExtent: 600.0, remainingCacheExtent: 850.0\n' - ' │ cacheOrigin: 0.0 )\n' + ' │ viewportMainAxisExtent: 600.0, remainingCacheExtent: 850.0,\n' + ' │ cacheOrigin: 0.0)\n' ' │ geometry: SliverGeometry(scrollExtent: 40000.0, paintExtent:\n' ' │ 600.0, maxPaintExtent: 40000.0, hasVisualOverflow: true,\n' ' │ cacheExtent: 850.0)\n' @@ -446,8 +446,8 @@ void main() { ' │ GrowthDirection.forward, ScrollDirection.idle, scrollOffset:\n' ' │ 2000.0, remainingPaintExtent: 600.0, crossAxisExtent: 800.0,\n' ' │ crossAxisDirection: AxisDirection.right,\n' - ' │ viewportMainAxisExtent: 600.0, remainingCacheExtent: 1100.0\n' - ' │ cacheOrigin: -250.0 )\n' + ' │ viewportMainAxisExtent: 600.0, remainingCacheExtent: 1100.0,\n' + ' │ cacheOrigin: -250.0)\n' ' │ geometry: SliverGeometry(scrollExtent: 40000.0, paintExtent:\n' ' │ 600.0, maxPaintExtent: 40000.0, hasVisualOverflow: true,\n' ' │ cacheExtent: 1100.0)\n' diff --git a/packages/flutter/test/widgets/list_view_viewporting_test.dart b/packages/flutter/test/widgets/list_view_viewporting_test.dart index 8a7ff0e2eb..c772aeb931 100644 --- a/packages/flutter/test/widgets/list_view_viewporting_test.dart +++ b/packages/flutter/test/widgets/list_view_viewporting_test.dart @@ -335,8 +335,8 @@ void main() { ' │ GrowthDirection.forward, ScrollDirection.idle, scrollOffset:\n' ' │ 0.0, remainingPaintExtent: 600.0, crossAxisExtent: 800.0,\n' ' │ crossAxisDirection: AxisDirection.right,\n' - ' │ viewportMainAxisExtent: 600.0, remainingCacheExtent: 850.0\n' - ' │ cacheOrigin: 0.0 )\n' + ' │ viewportMainAxisExtent: 600.0, remainingCacheExtent: 850.0,\n' + ' │ cacheOrigin: 0.0)\n' ' │ geometry: SliverGeometry(scrollExtent: 300.0, paintExtent: 300.0,\n' ' │ maxPaintExtent: 300.0, cacheExtent: 300.0)\n' ' │ currently live children: 0 to 2\n' diff --git a/packages/flutter/test/widgets/sliver_fill_viewport_test.dart b/packages/flutter/test/widgets/sliver_fill_viewport_test.dart index 18427e4fc8..00b9abf08a 100644 --- a/packages/flutter/test/widgets/sliver_fill_viewport_test.dart +++ b/packages/flutter/test/widgets/sliver_fill_viewport_test.dart @@ -72,8 +72,8 @@ void main() { ' │ GrowthDirection.forward, ScrollDirection.idle, scrollOffset:\n' ' │ 0.0, remainingPaintExtent: 600.0, crossAxisExtent: 800.0,\n' ' │ crossAxisDirection: AxisDirection.right,\n' - ' │ viewportMainAxisExtent: 600.0, remainingCacheExtent: 850.0\n' - ' │ cacheOrigin: 0.0 )\n' + ' │ viewportMainAxisExtent: 600.0, remainingCacheExtent: 850.0,\n' + ' │ cacheOrigin: 0.0)\n' ' │ geometry: SliverGeometry(scrollExtent: 12000.0, paintExtent:\n' ' │ 600.0, maxPaintExtent: 12000.0, hasVisualOverflow: true,\n' ' │ cacheExtent: 850.0)\n' @@ -85,8 +85,8 @@ void main() { ' │ GrowthDirection.forward, ScrollDirection.idle, scrollOffset:\n' ' │ 0.0, remainingPaintExtent: 600.0, crossAxisExtent: 800.0,\n' ' │ crossAxisDirection: AxisDirection.right,\n' - ' │ viewportMainAxisExtent: 600.0, remainingCacheExtent: 850.0\n' - ' │ cacheOrigin: 0.0 )\n' + ' │ viewportMainAxisExtent: 600.0, remainingCacheExtent: 850.0,\n' + ' │ cacheOrigin: 0.0)\n' ' │ geometry: SliverGeometry(scrollExtent: 12000.0, paintExtent:\n' ' │ 600.0, maxPaintExtent: 12000.0, hasVisualOverflow: true,\n' ' │ cacheExtent: 850.0)\n' diff --git a/packages/flutter/test/widgets/slivers_appbar_pinned_test.dart b/packages/flutter/test/widgets/slivers_appbar_pinned_test.dart index b97b05c0bb..4117552a9b 100644 --- a/packages/flutter/test/widgets/slivers_appbar_pinned_test.dart +++ b/packages/flutter/test/widgets/slivers_appbar_pinned_test.dart @@ -90,8 +90,8 @@ void main() { ' │ GrowthDirection.forward, ScrollDirection.idle, scrollOffset:\n' ' │ 0.0, remainingPaintExtent: 600.0, crossAxisExtent: 800.0,\n' ' │ crossAxisDirection: AxisDirection.right,\n' - ' │ viewportMainAxisExtent: 600.0, remainingCacheExtent: 850.0\n' - ' │ cacheOrigin: 0.0 )\n' + ' │ viewportMainAxisExtent: 600.0, remainingCacheExtent: 850.0,\n' + ' │ cacheOrigin: 0.0)\n' ' │ geometry: SliverGeometry(scrollExtent: 200.0, paintExtent: 200.0,\n' ' │ maxPaintExtent: 200.0, hasVisualOverflow: true, cacheExtent:\n' ' │ 200.0)\n' diff --git a/packages/flutter/test/widgets/text_test.dart b/packages/flutter/test/widgets/text_test.dart index 6ad3464f3f..4317d05f5f 100644 --- a/packages/flutter/test/widgets/text_test.dart +++ b/packages/flutter/test/widgets/text_test.dart @@ -772,8 +772,7 @@ void main() { // Each word takes up more than a half of a line. Together they // wrap onto two lines, but leave a lot of extra space. child: Text( - 'twowordsthateachtakeupmorethanhalfof alineoftextsothattheywr' - 'apwithlotsofextraspace', + 'twowordsthateachtakeupmorethanhalfof alineoftextsothattheywrapwithlotsofextraspace', textDirection: TextDirection.ltr, textWidthBasis: textWidthBasis, ), diff --git a/packages/flutter_driver/lib/src/driver/vmservice_driver.dart b/packages/flutter_driver/lib/src/driver/vmservice_driver.dart index 2a421a076d..72063d12d0 100644 --- a/packages/flutter_driver/lib/src/driver/vmservice_driver.dart +++ b/packages/flutter_driver/lib/src/driver/vmservice_driver.dart @@ -220,7 +220,7 @@ class VMServiceFlutterDriver extends FlutterDriver { rethrow; } _log( - 'Check Health failed, try to wait for the service extensions to be' + 'Check Health failed, try to wait for the service extensions to be ' 'registered.' ); await enableIsolateStreams(); diff --git a/packages/flutter_test/lib/src/test_async_utils.dart b/packages/flutter_test/lib/src/test_async_utils.dart index cf6f24868e..cd99756cb9 100644 --- a/packages/flutter_test/lib/src/test_async_utils.dart +++ b/packages/flutter_test/lib/src/test_async_utils.dart @@ -195,16 +195,17 @@ class TestAsyncUtils { final _StackEntry originalGuarder = _findResponsibleMethod(scope.creationStack, 'guard', information); final _StackEntry collidingGuarder = _findResponsibleMethod(StackTrace.current, 'guardSync', information); if (originalGuarder != null && collidingGuarder != null) { + final String originalKind = originalGuarder.className == null ? 'function' : 'method'; String originalName; if (originalGuarder.className == null) { - originalName = '(${originalGuarder.methodName}) '; + originalName = '$originalKind (${originalGuarder.methodName})'; information.add(ErrorDescription( 'The guarded "${originalGuarder.methodName}" function ' 'was called from ${originalGuarder.callerFile} ' 'on line ${originalGuarder.callerLine}.' )); } else { - originalName = '(${originalGuarder.className}.${originalGuarder.methodName}) '; + originalName = '$originalKind (${originalGuarder.className}.${originalGuarder.methodName})'; information.add(ErrorDescription( 'The guarded method "${originalGuarder.methodName}" ' 'from class ${originalGuarder.className} ' @@ -215,25 +216,26 @@ class TestAsyncUtils { final String again = (originalGuarder.callerFile == collidingGuarder.callerFile) && (originalGuarder.callerLine == collidingGuarder.callerLine) ? 'again ' : ''; + final String collidingKind = collidingGuarder.className == null ? 'function' : 'method'; String collidingName; if ((originalGuarder.className == collidingGuarder.className) && (originalGuarder.methodName == collidingGuarder.methodName)) { - originalName = ''; - collidingName = ''; + originalName = originalKind; + collidingName = collidingKind; information.add(ErrorDescription( 'Then, it ' 'was called ${again}from ${collidingGuarder.callerFile} ' 'on line ${collidingGuarder.callerLine}.' )); } else if (collidingGuarder.className == null) { - collidingName = '(${collidingGuarder.methodName}) '; + collidingName = '$collidingKind (${collidingGuarder.methodName})'; information.add(ErrorDescription( 'Then, the "${collidingGuarder.methodName}" function ' 'was called ${again}from ${collidingGuarder.callerFile} ' 'on line ${collidingGuarder.callerLine}.' )); } else { - collidingName = '(${collidingGuarder.className}.${collidingGuarder.methodName}) '; + collidingName = '$collidingKind (${collidingGuarder.className}.${collidingGuarder.methodName})'; information.add(ErrorDescription( 'Then, the "${collidingGuarder.methodName}" method ' '${originalGuarder.className == collidingGuarder.className ? "(also from class ${collidingGuarder.className})" @@ -243,9 +245,9 @@ class TestAsyncUtils { )); } information.add(ErrorDescription( - 'The first ${originalGuarder.className == null ? "function" : "method"} $originalName' + 'The first $originalName ' 'had not yet finished executing at the time that ' - 'the second ${collidingGuarder.className == null ? "function" : "method"} $collidingName' + 'the second $collidingName ' 'was called. Since both are guarded, and the second was not a nested call inside the first, the ' 'first must complete its execution before the second can be called. Typically, this is achieved by ' 'putting an "await" statement in front of the call to the first.' @@ -259,9 +261,7 @@ class TestAsyncUtils { )); } information.add(DiagnosticsStackTrace( - '\nWhen the first ${originalGuarder.className == null ? "function" : "method"} ' - '$originalName' - 'was called, this was the stack', + '\nWhen the first $originalName was called, this was the stack', scope.creationStack, )); } diff --git a/packages/flutter_test/test/controller_test.dart b/packages/flutter_test/test/controller_test.dart index 51bdf85955..f0b6051628 100644 --- a/packages/flutter_test/test/controller_test.dart +++ b/packages/flutter_test/test/controller_test.dart @@ -23,7 +23,7 @@ class TestDragData { void main() { testWidgets( - 'WidgetTester.drag must break the offset into multiple parallel components if' + 'WidgetTester.drag must break the offset into multiple parallel components if ' 'the drag goes outside the touch slop values', (WidgetTester tester) async { // This test checks to make sure that the total drag will be correctly split into diff --git a/packages/flutter_tools/lib/src/android/gradle.dart b/packages/flutter_tools/lib/src/android/gradle.dart index c7f7ed82b3..c921a3b8c8 100644 --- a/packages/flutter_tools/lib/src/android/gradle.dart +++ b/packages/flutter_tools/lib/src/android/gradle.dart @@ -642,7 +642,7 @@ ${globals.terminal.bolden('Consuming the Module')} '''); } - globals.printStatus('To learn more, visit https://flutter.dev/go/build-aar'''); + globals.printStatus('To learn more, visit https://flutter.dev/go/build-aar'); } String _hex(List bytes) { @@ -877,7 +877,7 @@ String _getLocalArtifactVersion(String pomPath) { ); } on FileSystemException { throwToolExit( - 'Error reading $pomPath. Please ensure that you have read permission to this' + 'Error reading $pomPath. Please ensure that you have read permission to this ' 'file and try again.'); } final Iterable project = document.findElements('project'); diff --git a/packages/flutter_tools/lib/src/android/gradle_errors.dart b/packages/flutter_tools/lib/src/android/gradle_errors.dart index 9d5e63ba4e..7187c28f23 100644 --- a/packages/flutter_tools/lib/src/android/gradle_errors.dart +++ b/packages/flutter_tools/lib/src/android/gradle_errors.dart @@ -236,8 +236,7 @@ final GradleHandledError licenseNotAcceptedHandler = GradleHandledError( bool shouldBuildPluginAsAar, }) async { const String licenseNotAcceptedMatcher = - r'You have not accepted the license agreements of the following SDK components:' - r'\s*\[(.+)\]'; + r'You have not accepted the license agreements of the following SDK components:\s*\[(.+)\]'; final RegExp licenseFailure = RegExp(licenseNotAcceptedMatcher, multiLine: true); assert(licenseFailure != null); diff --git a/packages/flutter_tools/lib/src/codegen.dart b/packages/flutter_tools/lib/src/codegen.dart index 6be4fed1e7..d330fdbfb1 100644 --- a/packages/flutter_tools/lib/src/codegen.dart +++ b/packages/flutter_tools/lib/src/codegen.dart @@ -110,7 +110,7 @@ class CodeGeneratingKernelCompiler implements KernelCompiler { List dartDefines, }) async { if (fileSystemRoots != null || fileSystemScheme != null || depFilePath != null || targetModel != null || sdkRoot != null || packagesPath != null) { - globals.printTrace('fileSystemRoots, fileSystemScheme, depFilePath, targetModel,' + globals.printTrace('fileSystemRoots, fileSystemScheme, depFilePath, targetModel, ' 'sdkRoot, packagesPath are not supported when using the experimental ' 'build* pipeline'); } diff --git a/packages/flutter_tools/lib/src/commands/build_aar.dart b/packages/flutter_tools/lib/src/commands/build_aar.dart index 1772be3484..82784526ec 100644 --- a/packages/flutter_tools/lib/src/commands/build_aar.dart +++ b/packages/flutter_tools/lib/src/commands/build_aar.dart @@ -47,7 +47,7 @@ class BuildAarCommand extends BuildSubCommand { ) ..addOption( 'output-dir', - help: 'The absolute path to the directory where the repository is generated.' + help: 'The absolute path to the directory where the repository is generated. ' 'By default, this is \'android/build\'. ', ); } diff --git a/packages/flutter_tools/lib/src/commands/build_web.dart b/packages/flutter_tools/lib/src/commands/build_web.dart index d47581af70..7934a7d456 100644 --- a/packages/flutter_tools/lib/src/commands/build_web.dart +++ b/packages/flutter_tools/lib/src/commands/build_web.dart @@ -28,7 +28,7 @@ class BuildWebCommand extends BuildSubCommand { argParser.addFlag('csp', defaultsTo: false, negatable: false, - help: 'Disable dynamic generation of code in the generated output.' + help: 'Disable dynamic generation of code in the generated output. ' 'This is necessary to satisfy CSP restrictions (see http://www.w3.org/TR/CSP/).' ); } diff --git a/packages/flutter_tools/lib/src/commands/create.dart b/packages/flutter_tools/lib/src/commands/create.dart index 937e8e461a..9d7c122674 100644 --- a/packages/flutter_tools/lib/src/commands/create.dart +++ b/packages/flutter_tools/lib/src/commands/create.dart @@ -857,8 +857,10 @@ String _validateProjectDir(String dirPath, { String flutterRoot, bool overwrite // If the destination directory is actually a file, then we refuse to // overwrite, on the theory that the user probably didn't expect it to exist. if (globals.fs.isFileSync(dirPath)) { - return "Invalid project name: '$dirPath' - refers to an existing file." - '${overwrite ? ' Refusing to overwrite a file with a directory.' : ''}'; + final String message = "Invalid project name: '$dirPath' - refers to an existing file."; + return overwrite + ? '$message Refusing to overwrite a file with a directory.' + : message; } if (overwrite) { diff --git a/packages/flutter_tools/lib/src/commands/ide_config.dart b/packages/flutter_tools/lib/src/commands/ide_config.dart index b0ab52efd6..91b78b8371 100644 --- a/packages/flutter_tools/lib/src/commands/ide_config.dart +++ b/packages/flutter_tools/lib/src/commands/ide_config.dart @@ -52,7 +52,7 @@ class IdeConfigCommand extends FlutterCommand { 'missing. If --overwrite is specified, will revert existing files to ' 'the template versions, reset the module list, and return configuration ' 'settings to the template versions.\n\n' - 'This command is intended for Flutter developers to help them set up the' + 'This command is intended for Flutter developers to help them set up the ' "Flutter tree for development in an IDE. It doesn't affect other projects.\n\n" 'Currently, IntelliJ is the default (and only) IDE that may be configured.'; diff --git a/packages/flutter_tools/lib/src/commands/screenshot.dart b/packages/flutter_tools/lib/src/commands/screenshot.dart index e0a818f773..f2fd48f441 100644 --- a/packages/flutter_tools/lib/src/commands/screenshot.dart +++ b/packages/flutter_tools/lib/src/commands/screenshot.dart @@ -32,7 +32,7 @@ class ScreenshotCommand extends FlutterCommand { valueHelp: 'URI', help: 'The observatory URI to connect to.\n' 'This is required when --$_kType is "$_kSkiaType" or "$_kRasterizerType".\n' - 'To find the observatory URI, use "flutter run" and look for' + 'To find the observatory URI, use "flutter run" and look for ' '"An Observatory ... is available at" in the output.', ); argParser.addOption( diff --git a/packages/flutter_tools/lib/src/commands/update_packages.dart b/packages/flutter_tools/lib/src/commands/update_packages.dart index 56780921e7..ddc2dfa8e4 100644 --- a/packages/flutter_tools/lib/src/commands/update_packages.dart +++ b/packages/flutter_tools/lib/src/commands/update_packages.dart @@ -61,7 +61,7 @@ class UpdatePackagesCommand extends FlutterCommand { ) ..addFlag( 'consumer-only', - help: 'Only prints the dependency graph that is the transitive closure' + help: 'Only prints the dependency graph that is the transitive closure ' 'that a consumer of the Flutter SDK will observe (When combined ' 'with transitive-closure)', defaultsTo: false, diff --git a/packages/flutter_tools/lib/src/commands/upgrade.dart b/packages/flutter_tools/lib/src/commands/upgrade.dart index 66f39409bc..f8e0962d62 100644 --- a/packages/flutter_tools/lib/src/commands/upgrade.dart +++ b/packages/flutter_tools/lib/src/commands/upgrade.dart @@ -163,8 +163,8 @@ class UpgradeCommandRunner { } on ProcessException catch (error) { throwToolExit( 'The tool could not verify the status of the current flutter checkout. ' - 'This might be due to git not being installed or an internal error.' - 'If it is okay to ignore potential local changes, then re-run this' + 'This might be due to git not being installed or an internal error. ' + 'If it is okay to ignore potential local changes, then re-run this ' 'command with --force.' '\nError: $error.' ); @@ -212,7 +212,7 @@ class UpgradeCommandRunner { } on ProcessException catch (error) { throwToolExit( 'Unable to upgrade Flutter: The tool could not update to the version $tag. ' - 'This may be due to git not being installed or an internal error.' + 'This may be due to git not being installed or an internal error. ' 'Please ensure that git is installed on your computer and retry again.' '\nError: $error.' ); diff --git a/packages/flutter_tools/lib/src/commands/version.dart b/packages/flutter_tools/lib/src/commands/version.dart index 3e2cca5608..cb8f6cc380 100644 --- a/packages/flutter_tools/lib/src/commands/version.dart +++ b/packages/flutter_tools/lib/src/commands/version.dart @@ -74,8 +74,8 @@ class VersionCommand extends FlutterCommand { if (targetVersion < minSupportedVersion) { if (!boolArg('force')) { globals.printError( - 'Version command is not supported in $targetVersion and it is supported since version $minSupportedVersion' - 'which means if you switch to version $minSupportedVersion then you can not use version command.' + 'Version command is not supported in $targetVersion and it is supported since version $minSupportedVersion ' + 'which means if you switch to version $minSupportedVersion then you can not use version command. ' 'If you really want to switch to version $targetVersion, please use `--force` flag: `flutter version --force $targetVersion`.' ); return const FlutterCommandResult(ExitStatus.success); diff --git a/packages/flutter_tools/lib/src/convert.dart b/packages/flutter_tools/lib/src/convert.dart index 88260ecbed..36d1fbcd30 100644 --- a/packages/flutter_tools/lib/src/convert.dart +++ b/packages/flutter_tools/lib/src/convert.dart @@ -40,7 +40,7 @@ class Utf8Decoder extends cnv.Utf8Decoder { if (reportErrors && result.contains('\u{FFFD}')) { throwToolExit( 'Bad UTF-8 encoding found while decoding string: $result. ' - 'The Flutter team would greatly appreciate if you could file a bug or leave a' + 'The Flutter team would greatly appreciate if you could file a bug or leave a ' 'comment on the issue https://github.com/flutter/flutter/issues/15646.\n' 'The source bytes were:\n$codeUnits\n\n'); } diff --git a/packages/flutter_tools/lib/src/ios/bitcode.dart b/packages/flutter_tools/lib/src/ios/bitcode.dart index 2ec0f480d4..ed08cb7781 100644 --- a/packages/flutter_tools/lib/src/ios/bitcode.dart +++ b/packages/flutter_tools/lib/src/ios/bitcode.dart @@ -38,7 +38,7 @@ Future validateBitcode(BuildMode buildMode, TargetPlatform targetPlatform) throwToolExit( 'The Flutter.framework at $flutterFrameworkPath was built ' 'with "${engineClangVersion ?? 'unknown'}", but the current version ' - 'of clang is "$clangVersion". This will result in failures when trying to' + 'of clang is "$clangVersion". This will result in failures when trying to ' 'archive an IPA. To resolve this issue, update your version of Xcode to ' 'at least $engineClangSemVer.', ); diff --git a/packages/flutter_tools/lib/src/mdns_discovery.dart b/packages/flutter_tools/lib/src/mdns_discovery.dart index dea4976803..4609e69f24 100644 --- a/packages/flutter_tools/lib/src/mdns_discovery.dart +++ b/packages/flutter_tools/lib/src/mdns_discovery.dart @@ -195,7 +195,7 @@ class MDnsObservatoryDiscovery { 'The mDNS query for an attached iOS device failed. It may ' 'be necessary to disable the "Personal Hotspot" on the device, and ' 'to ensure that the "Disable unless needed" setting is unchecked ' - 'under System Preferences > Network > iPhone USB.' + 'under System Preferences > Network > iPhone USB. ' 'See https://github.com/flutter/flutter/issues/46698 for details.' ); break; diff --git a/packages/flutter_tools/lib/src/plugins.dart b/packages/flutter_tools/lib/src/plugins.dart index e3aa59515b..e3ef810301 100644 --- a/packages/flutter_tools/lib/src/plugins.dart +++ b/packages/flutter_tools/lib/src/plugins.dart @@ -187,8 +187,8 @@ class Plugin { if (usesOldPluginFormat && usesNewPluginFormat) { const String errorMessage = - 'The flutter.plugin.platforms key cannot be used in combination with the old' - 'flutter.plugin.{androidPackage,iosPrefix,pluginClass} keys.' + 'The flutter.plugin.platforms key cannot be used in combination with the old ' + 'flutter.plugin.{androidPackage,iosPrefix,pluginClass} keys. ' 'See: https://flutter.dev/docs/development/packages-and-plugins/developing-packages#plugin'; return [errorMessage]; } diff --git a/packages/flutter_tools/lib/src/runner/flutter_command.dart b/packages/flutter_tools/lib/src/runner/flutter_command.dart index 84fbf2cad4..90b346d784 100644 --- a/packages/flutter_tools/lib/src/runner/flutter_command.dart +++ b/packages/flutter_tools/lib/src/runner/flutter_command.dart @@ -229,7 +229,7 @@ abstract class FlutterCommand extends Command { /// Adds options for connecting to the Dart VM observatory port. void usesPortOptions() { argParser.addOption(observatoryPortOption, - help: '(deprecated use host-vmservice-port instead)' + help: '(deprecated use host-vmservice-port instead) ' 'Listen to the given port for an observatory debugger connection.\n' 'Specifying port 0 (the default) will find a random free port.', ); @@ -368,11 +368,11 @@ abstract class FlutterCommand extends Command { argParser.addFlag('shrink', negatable: true, defaultsTo: true, - help: 'Whether to enable code shrinking on release mode.' + help: 'Whether to enable code shrinking on release mode. ' 'When enabling shrinking, you also benefit from obfuscation, ' 'which shortens the names of your app’s classes and members, ' 'and optimization, which applies more aggressive strategies to ' - 'further reduce the size of your app.' + 'further reduce the size of your app. ' 'To learn more, see: https://developer.android.com/studio/build/shrink-code', ); } diff --git a/packages/flutter_tools/test/general.shard/commands/build_aot_test.dart b/packages/flutter_tools/test/general.shard/commands/build_aot_test.dart index 0bec43c43f..b308a79840 100644 --- a/packages/flutter_tools/test/general.shard/commands/build_aot_test.dart +++ b/packages/flutter_tools/test/general.shard/commands/build_aot_test.dart @@ -150,7 +150,7 @@ void main() { validateBitcode(BuildMode.release, TargetPlatform.ios), equals('The Flutter.framework at ios_profile/Flutter.framework was built with "Apple LLVM version 10.0.1 ' '(clang-1234.1.12.1)", but the current version of clang is "Apple LLVM version 10.0.0 (clang-4567.1.1.1)". ' - 'This will result in failures when trying toarchive an IPA. To resolve this issue, update your version ' + 'This will result in failures when trying to archive an IPA. To resolve this issue, update your version ' 'of Xcode to at least 10.0.1.'), ); }, overrides: {