Revert string interp (#49602)
diff --git a/dev/bots/unpublish_package.dart b/dev/bots/unpublish_package.dart index 5385ec2..581cd8f 100644 --- a/dev/bots/unpublish_package.dart +++ b/dev/bots/unpublish_package.dart
@@ -391,7 +391,7 @@ final String banner = '*** $message ***'; print('\n'); print('*' * banner.length); - print(banner); + print('$banner'); print('*' * banner.length); print('\n'); }
diff --git a/dev/customer_testing/run_tests.dart b/dev/customer_testing/run_tests.dart index 4a662ba..62133a4 100644 --- a/dev/customer_testing/run_tests.dart +++ b/dev/customer_testing/run_tests.dart
@@ -272,7 +272,7 @@ print('>> $command'); Process process; if (Platform.isWindows) { - process = await Process.start('CMD.EXE', <String>['/S', '/C', command], workingDirectory: directory.path); + process = await Process.start('CMD.EXE', <String>['/S', '/C', '$command'], workingDirectory: directory.path); } else { final List<String> segments = command.trim().split(_spaces); process = await Process.start(segments.first, segments.skip(1).toList(), workingDirectory: directory.path);
diff --git a/dev/devicelab/bin/tasks/named_isolates_test.dart b/dev/devicelab/bin/tasks/named_isolates_test.dart index af0bf60..acfa1cd 100644 --- a/dev/devicelab/bin/tasks/named_isolates_test.dart +++ b/dev/devicelab/bin/tasks/named_isolates_test.dart
@@ -51,7 +51,7 @@ print('Extracted observatory port: $observatoryUri'); final Process attachProcess = await _run(device: device, command: <String>['attach', '--debug-uri', - observatoryUri, '--isolate-filter', _kSecondIsolateName], stdoutListener: (String line) { + observatoryUri, '--isolate-filter', '$_kSecondIsolateName'], stdoutListener: (String line) { if (line.contains(_kFirstIsolateName)) { firstNameFound.complete(); } else if (line.contains(_kSecondIsolateName)) {
diff --git a/dev/integration_tests/release_smoke_test/lib/main.dart b/dev/integration_tests/release_smoke_test/lib/main.dart index d45b047..c2106a0 100644 --- a/dev/integration_tests/release_smoke_test/lib/main.dart +++ b/dev/integration_tests/release_smoke_test/lib/main.dart
@@ -2,18 +2,28 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +import 'dart:convert' show utf8; + +import 'package:flutter/foundation.dart'; import 'package:flutter/widgets.dart'; -void main() { +Future<void> main() async { const Text text = Text('Hello, world!', textDirection: TextDirection.ltr); // These calls must not result in an error. They behave differently in // release mode compared to debug or profile. // The test will grep logcat for any errors emitted by Flutter. print(text.toDiagnosticsNode()); print(text.toStringDeep()); + // regression test for https://github.com/flutter/flutter/issues/49601 + final List<int> computed = await compute(_utf8Encode, 'test', debugLabel: null); + print(computed); runApp( const Center( child: text, ), ); } + +List<int> _utf8Encode(String data) { + return utf8.encode(data); +}
diff --git a/dev/manual_tests/lib/density.dart b/dev/manual_tests/lib/density.dart index b49d4d4..6c94ffc 100644 --- a/dev/manual_tests/lib/density.dart +++ b/dev/manual_tests/lib/density.dart
@@ -246,7 +246,7 @@ ), ), Text( - widget.model.size.toStringAsFixed(3), + '${widget.model.size.toStringAsFixed(3)}', style: TextStyle(color: Colors.grey[50]), ), ], @@ -261,7 +261,7 @@ child: SliderTheme( data: controlTheme, child: Slider( - label: widget.model.density.horizontal.toStringAsFixed(1), + label: '${widget.model.density.horizontal.toStringAsFixed(1)}', min: VisualDensity.minimumDensity, max: VisualDensity.maximumDensity, onChanged: (double value) { @@ -272,7 +272,7 @@ ), ), Text( - widget.model.density.horizontal.toStringAsFixed(3), + '${widget.model.density.horizontal.toStringAsFixed(3)}', style: TextStyle(color: Colors.grey[50]), ), ], @@ -287,7 +287,7 @@ child: SliderTheme( data: controlTheme, child: Slider( - label: widget.model.density.vertical.toStringAsFixed(1), + label: '${widget.model.density.vertical.toStringAsFixed(1)}', min: VisualDensity.minimumDensity, max: VisualDensity.maximumDensity, onChanged: (double value) { @@ -298,7 +298,7 @@ ), ), Text( - widget.model.density.vertical.toStringAsFixed(3), + '${widget.model.density.vertical.toStringAsFixed(3)}', style: TextStyle(color: Colors.grey[50]), ), ],
diff --git a/dev/tools/gen_keycodes/lib/code_gen.dart b/dev/tools/gen_keycodes/lib/code_gen.dart index 7d80476..c7f006a 100644 --- a/dev/tools/gen_keycodes/lib/code_gen.dart +++ b/dev/tools/gen_keycodes/lib/code_gen.dart
@@ -25,7 +25,7 @@ currentLine += ' $word'; } else { result.writeln('$prefix$currentLine'); - currentLine = word; + currentLine = '$word'; } } if (currentLine.isNotEmpty) {
diff --git a/dev/tools/localization/localizations_utils.dart b/dev/tools/localization/localizations_utils.dart index 4c0ae2c..9813d433 100644 --- a/dev/tools/localization/localizations_utils.dart +++ b/dev/tools/localization/localizations_utils.dart
@@ -339,7 +339,7 @@ assert(subtags.isNotEmpty); assert(_languages.containsKey(subtags[0])); final String language = _languages[subtags[0]]; - String output = language; + String output = '$language'; String region; String script; if (subtags.length == 2) {
diff --git a/examples/catalog/bin/sample_page.dart b/examples/catalog/bin/sample_page.dart index 6e1ae65..852e718 100644 --- a/examples/catalog/bin/sample_page.dart +++ b/examples/catalog/bin/sample_page.dart
@@ -202,7 +202,7 @@ outputFile('${className}_index.md'), inputFile('bin', 'class_index.md.template').readAsStringSync(), <String, String>{ - 'class': className, + 'class': '$className', 'entries': entries.join('\n'), 'link': '${className}_index', },
diff --git a/examples/flutter_gallery/lib/demo/material/data_table_demo.dart b/examples/flutter_gallery/lib/demo/material/data_table_demo.dart index 507c181..da59408 100644 --- a/examples/flutter_gallery/lib/demo/material/data_table_demo.dart +++ b/examples/flutter_gallery/lib/demo/material/data_table_demo.dart
@@ -113,11 +113,11 @@ } }, cells: <DataCell>[ - DataCell(Text(dessert.name)), + DataCell(Text('${dessert.name}')), DataCell(Text('${dessert.calories}')), - DataCell(Text(dessert.fat.toStringAsFixed(1))), + DataCell(Text('${dessert.fat.toStringAsFixed(1)}')), DataCell(Text('${dessert.carbs}')), - DataCell(Text(dessert.protein.toStringAsFixed(1))), + DataCell(Text('${dessert.protein.toStringAsFixed(1)}')), DataCell(Text('${dessert.sodium}')), DataCell(Text('${dessert.calcium}%')), DataCell(Text('${dessert.iron}%')),
diff --git a/examples/flutter_gallery/lib/demo/material/full_screen_dialog_demo.dart b/examples/flutter_gallery/lib/demo/material/full_screen_dialog_demo.dart index a3a6eeb..775a688 100644 --- a/examples/flutter_gallery/lib/demo/material/full_screen_dialog_demo.dart +++ b/examples/flutter_gallery/lib/demo/material/full_screen_dialog_demo.dart
@@ -83,7 +83,7 @@ }, child: Row( children: <Widget>[ - Text(time.format(context)), + Text('${time.format(context)}'), const Icon(Icons.arrow_drop_down, color: Colors.black54), ], ),
diff --git a/examples/flutter_gallery/lib/demo/material/tabs_demo.dart b/examples/flutter_gallery/lib/demo/material/tabs_demo.dart index 9cef2c0..d1ec375 100644 --- a/examples/flutter_gallery/lib/demo/material/tabs_demo.dart +++ b/examples/flutter_gallery/lib/demo/material/tabs_demo.dart
@@ -113,7 +113,7 @@ alignment: page.id == 'H' ? Alignment.centerLeft : Alignment.centerRight, - child: CircleAvatar(child: Text(page.id)), + child: CircleAvatar(child: Text('${page.id}')), ), SizedBox( width: 144.0,
diff --git a/examples/flutter_gallery/lib/gallery/options.dart b/examples/flutter_gallery/lib/gallery/options.dart index 0bb4765..a3b57c0 100644 --- a/examples/flutter_gallery/lib/gallery/options.dart +++ b/examples/flutter_gallery/lib/gallery/options.dart
@@ -231,7 +231,7 @@ children: <Widget>[ const Text('Theme'), Text( - modeLabels[options.themeMode], + '${modeLabels[options.themeMode]}', style: Theme.of(context).primaryTextTheme.bodyText2, ), ], @@ -278,7 +278,7 @@ children: <Widget>[ const Text('Text size'), Text( - options.textScaleFactor.label, + '${options.textScaleFactor.label}', style: Theme.of(context).primaryTextTheme.bodyText2, ), ], @@ -324,7 +324,7 @@ children: <Widget>[ const Text('Visual density'), Text( - options.visualDensity.label, + '${options.visualDensity.label}', style: Theme.of(context).primaryTextTheme.bodyText2, ), ], @@ -431,7 +431,7 @@ children: <Widget>[ const Text('Platform mechanics'), Text( - _platformLabel(options.platform), + '${_platformLabel(options.platform)}', style: Theme.of(context).primaryTextTheme.bodyText2, ), ],
diff --git a/examples/stocks/lib/stock_symbol_viewer.dart b/examples/stocks/lib/stock_symbol_viewer.dart index 88a2f8e..e375ace 100644 --- a/examples/stocks/lib/stock_symbol_viewer.dart +++ b/examples/stocks/lib/stock_symbol_viewer.dart
@@ -29,7 +29,7 @@ Row( children: <Widget>[ Text( - stock.symbol, + '${stock.symbol}', key: ValueKey<String>('${stock.symbol}_symbol_name'), style: Theme.of(context).textTheme.headline3, ), @@ -43,7 +43,7 @@ height: 8.0 ), Text('Market Cap', style: headings), - Text(stock.marketCap), + Text('${stock.marketCap}'), Container( height: 8.0 ),
diff --git a/packages/flutter/lib/src/animation/animation.dart b/packages/flutter/lib/src/animation/animation.dart index b1cfaa3..9f67855 100644 --- a/packages/flutter/lib/src/animation/animation.dart +++ b/packages/flutter/lib/src/animation/animation.dart
@@ -207,6 +207,6 @@ break; } assert(icon != null); - return icon; + return '$icon'; } }
diff --git a/packages/flutter/lib/src/animation/curves.dart b/packages/flutter/lib/src/animation/curves.dart index 707ee10..6d52f1e 100644 --- a/packages/flutter/lib/src/animation/curves.dart +++ b/packages/flutter/lib/src/animation/curves.dart
@@ -46,7 +46,7 @@ } @override - String toString() => objectRuntimeType(this, 'ParametricCurve'); + String toString() => '${objectRuntimeType(this, 'ParametricCurve')}'; } /// An parametric animation easing curve, i.e. a mapping of the unit interval to
diff --git a/packages/flutter/lib/src/foundation/_isolates_io.dart b/packages/flutter/lib/src/foundation/_isolates_io.dart index 37e3265..6c65264 100644 --- a/packages/flutter/lib/src/foundation/_isolates_io.dart +++ b/packages/flutter/lib/src/foundation/_isolates_io.dart
@@ -80,7 +80,7 @@ Future<void> _spawn<Q, R>(_IsolateConfiguration<Q, FutureOr<R>> configuration) async { R result; await Timeline.timeSync( - configuration.debugLabel, + '${configuration.debugLabel}', () async { final FutureOr<R> applicationResult = await configuration.apply(); result = await applicationResult;
diff --git a/packages/flutter/lib/src/foundation/assertions.dart b/packages/flutter/lib/src/foundation/assertions.dart index 34a9c54..9154267 100644 --- a/packages/flutter/lib/src/foundation/assertions.dart +++ b/packages/flutter/lib/src/foundation/assertions.dart
@@ -381,7 +381,7 @@ debugFillProperties(builder); summary = builder.properties.firstWhere((DiagnosticsNode node) => node.level == DiagnosticLevel.summary, orElse: () => null); } - return summary ?? ErrorSummary(formatException()); + return summary ?? ErrorSummary('${formatException()}'); } @override @@ -415,7 +415,7 @@ String message = exceptionAsString(); if (message.startsWith(prefix)) message = message.substring(prefix.length); - properties.add(ErrorSummary(message)); + properties.add(ErrorSummary('$message')); } }
diff --git a/packages/flutter/lib/src/foundation/diagnostics.dart b/packages/flutter/lib/src/foundation/diagnostics.dart index 5635558..118e1d0 100644 --- a/packages/flutter/lib/src/foundation/diagnostics.dart +++ b/packages/flutter/lib/src/foundation/diagnostics.dart
@@ -1277,7 +1277,7 @@ // with cases where a single line properties output may not have single // linebreak. final String propertyRender = render(property, - prefixLineOne: propertyStyle.prefixLineOne, + prefixLineOne: '${propertyStyle.prefixLineOne}', prefixOtherLines: '${propertyStyle.childLinkSpace}${propertyStyle.prefixOtherLines}', parentConfiguration: config, ); @@ -1306,7 +1306,7 @@ if (!config.lineBreakProperties) builder.write(config.lineBreak); - final String prefixChildren = config.bodyIndent; + final String prefixChildren = '${config.bodyIndent}'; final String prefixChildrenRaw = '$prefixOtherLines$prefixChildren'; if (children.isEmpty && config.addBlankLineIfNoChildren &&
diff --git a/packages/flutter/lib/src/gestures/mouse_tracking.dart b/packages/flutter/lib/src/gestures/mouse_tracking.dart index 0094ce8..871e3ad 100644 --- a/packages/flutter/lib/src/gestures/mouse_tracking.dart +++ b/packages/flutter/lib/src/gestures/mouse_tracking.dart
@@ -174,7 +174,7 @@ @override String toString() { String describeEvent(PointerEvent event) { - return event == null ? 'null' : describeIdentity(event); + return event == null ? 'null' : '${describeIdentity(event)}'; } final String describeLatestEvent = 'latestEvent: ${describeEvent(latestEvent)}'; final String describeAnnotations = 'annotations: [list of ${annotations.length}]';
diff --git a/packages/flutter/lib/src/material/floating_action_button_location.dart b/packages/flutter/lib/src/material/floating_action_button_location.dart index fd1ec08..533eaf2 100644 --- a/packages/flutter/lib/src/material/floating_action_button_location.dart +++ b/packages/flutter/lib/src/material/floating_action_button_location.dart
@@ -122,7 +122,7 @@ Offset getOffset(ScaffoldPrelayoutGeometry scaffoldGeometry); @override - String toString() => objectRuntimeType(this, 'FloatingActionButtonLocation'); + String toString() => '${objectRuntimeType(this, 'FloatingActionButtonLocation')}'; } double _leftOffset(ScaffoldPrelayoutGeometry scaffoldGeometry, { double offset = 0.0 }) { @@ -407,7 +407,7 @@ double getAnimationRestart(double previousValue) => 0.0; @override - String toString() => objectRuntimeType(this, 'FloatingActionButtonAnimator'); + String toString() => '${objectRuntimeType(this, 'FloatingActionButtonAnimator')}'; } class _ScalingFabMotionAnimator extends FloatingActionButtonAnimator {
diff --git a/packages/flutter/lib/src/painting/decoration.dart b/packages/flutter/lib/src/painting/decoration.dart index a629ce7..03e665a 100644 --- a/packages/flutter/lib/src/painting/decoration.dart +++ b/packages/flutter/lib/src/painting/decoration.dart
@@ -26,7 +26,7 @@ const Decoration(); @override - String toStringShort() => objectRuntimeType(this, 'Decoration'); + String toStringShort() => '${objectRuntimeType(this, 'Decoration')}'; /// In checked mode, throws an exception if the object is not in a /// valid configuration. Otherwise, returns true.
diff --git a/packages/flutter/lib/src/painting/strut_style.dart b/packages/flutter/lib/src/painting/strut_style.dart index 2cd5b3e..66f7186 100644 --- a/packages/flutter/lib/src/painting/strut_style.dart +++ b/packages/flutter/lib/src/painting/strut_style.dart
@@ -571,7 +571,7 @@ } @override - String toStringShort() => objectRuntimeType(this, 'StrutStyle'); + String toStringShort() => '${objectRuntimeType(this, 'StrutStyle')}'; /// Adds all properties prefixing property names with the optional `prefix`. @override
diff --git a/packages/flutter/lib/src/painting/text_span.dart b/packages/flutter/lib/src/painting/text_span.dart index 2387294..a174b4c 100644 --- a/packages/flutter/lib/src/painting/text_span.dart +++ b/packages/flutter/lib/src/painting/text_span.dart
@@ -440,7 +440,7 @@ ); @override - String toStringShort() => objectRuntimeType(this, 'TextSpan'); + String toStringShort() => '${objectRuntimeType(this, 'TextSpan')}'; @override void debugFillProperties(DiagnosticPropertiesBuilder properties) {
diff --git a/packages/flutter/lib/src/painting/text_style.dart b/packages/flutter/lib/src/painting/text_style.dart index f84063f..be50003 100644 --- a/packages/flutter/lib/src/painting/text_style.dart +++ b/packages/flutter/lib/src/painting/text_style.dart
@@ -1195,7 +1195,7 @@ } @override - String toStringShort() => objectRuntimeType(this, 'TextStyle'); + String toStringShort() => '${objectRuntimeType(this, 'TextStyle')}'; /// Adds all properties prefixing property names with the optional `prefix`. @override
diff --git a/packages/flutter/lib/src/physics/simulation.dart b/packages/flutter/lib/src/physics/simulation.dart index fc67321..9a9f665 100644 --- a/packages/flutter/lib/src/physics/simulation.dart +++ b/packages/flutter/lib/src/physics/simulation.dart
@@ -54,5 +54,5 @@ Tolerance tolerance; @override - String toString() => objectRuntimeType(this, 'Simulation'); + String toString() => '${objectRuntimeType(this, 'Simulation')}'; }
diff --git a/packages/flutter/lib/src/rendering/custom_layout.dart b/packages/flutter/lib/src/rendering/custom_layout.dart index 71dd112..af8ee03 100644 --- a/packages/flutter/lib/src/rendering/custom_layout.dart +++ b/packages/flutter/lib/src/rendering/custom_layout.dart
@@ -294,7 +294,7 @@ /// /// By default, returns the [runtimeType] of the class. @override - String toString() => objectRuntimeType(this, 'MultiChildLayoutDelegate'); + String toString() => '${objectRuntimeType(this, 'MultiChildLayoutDelegate')}'; } /// Defers the layout of multiple children to a delegate.
diff --git a/packages/flutter/lib/src/rendering/flow.dart b/packages/flutter/lib/src/rendering/flow.dart index 15b1447..dcc9d53 100644 --- a/packages/flutter/lib/src/rendering/flow.dart +++ b/packages/flutter/lib/src/rendering/flow.dart
@@ -132,7 +132,7 @@ /// /// By default, returns the [runtimeType] of the class. @override - String toString() => objectRuntimeType(this, 'FlowDelegate'); + String toString() => '${objectRuntimeType(this, 'FlowDelegate')}'; } /// Parent data for use with [RenderFlow].
diff --git a/packages/flutter/lib/src/rendering/proxy_box.dart b/packages/flutter/lib/src/rendering/proxy_box.dart index 8553064..afa7b56 100644 --- a/packages/flutter/lib/src/rendering/proxy_box.dart +++ b/packages/flutter/lib/src/rendering/proxy_box.dart
@@ -1138,7 +1138,7 @@ bool shouldReclip(covariant CustomClipper<T> oldClipper); @override - String toString() => objectRuntimeType(this, 'CustomClipper'); + String toString() => '${objectRuntimeType(this, 'CustomClipper')}'; } /// A [CustomClipper] that clips to the outer path of a [ShapeBorder].
diff --git a/packages/flutter/lib/src/rendering/sliver.dart b/packages/flutter/lib/src/rendering/sliver.dart index bd3be14..d56720c 100644 --- a/packages/flutter/lib/src/rendering/sliver.dart +++ b/packages/flutter/lib/src/rendering/sliver.dart
@@ -759,7 +759,7 @@ } @override - String toStringShort() => objectRuntimeType(this, 'SliverGeometry'); + String toStringShort() => '${objectRuntimeType(this, 'SliverGeometry')}'; @override void debugFillProperties(DiagnosticPropertiesBuilder properties) {
diff --git a/packages/flutter/lib/src/rendering/table.dart b/packages/flutter/lib/src/rendering/table.dart index f627f95..b7ca6c4 100644 --- a/packages/flutter/lib/src/rendering/table.dart +++ b/packages/flutter/lib/src/rendering/table.dart
@@ -76,7 +76,7 @@ double flex(Iterable<RenderBox> cells) => null; @override - String toString() => objectRuntimeType(this, 'TableColumnWidth'); + String toString() => '${objectRuntimeType(this, 'TableColumnWidth')}'; } /// Sizes the column according to the intrinsic dimensions of all the
diff --git a/packages/flutter/lib/src/semantics/semantics.dart b/packages/flutter/lib/src/semantics/semantics.dart index 148a473..495b4ae 100644 --- a/packages/flutter/lib/src/semantics/semantics.dart +++ b/packages/flutter/lib/src/semantics/semantics.dart
@@ -376,7 +376,7 @@ bool hasAction(SemanticsAction action) => (actions & action.index) != 0; @override - String toStringShort() => objectRuntimeType(this, 'SemanticsData'); + String toStringShort() => '${objectRuntimeType(this, 'SemanticsData')}'; @override void debugFillProperties(DiagnosticPropertiesBuilder properties) { @@ -1150,7 +1150,7 @@ } @override - String toStringShort() => objectRuntimeType(this, 'SemanticsProperties'); // the hashCode isn't important since we're immutable + String toStringShort() => '${objectRuntimeType(this, 'SemanticsProperties')}'; // the hashCode isn't important since we're immutable } /// In tests use this function to reset the counter used to generate
diff --git a/packages/flutter/lib/src/widgets/basic.dart b/packages/flutter/lib/src/widgets/basic.dart index 56981da..4ea531b 100644 --- a/packages/flutter/lib/src/widgets/basic.dart +++ b/packages/flutter/lib/src/widgets/basic.dart
@@ -2099,9 +2099,9 @@ } else if (width == 0.0 && height == 0.0) { type = '${objectRuntimeType(this, 'SizedBox')}.shrink'; } else { - type = objectRuntimeType(this, 'SizedBox'); + type = '${objectRuntimeType(this, 'SizedBox')}'; } - return key == null ? type : '$type-$key'; + return key == null ? '$type' : '$type-$key'; } @override
diff --git a/packages/flutter/lib/src/widgets/debug.dart b/packages/flutter/lib/src/widgets/debug.dart index e613747..79a8746 100644 --- a/packages/flutter/lib/src/widgets/debug.dart +++ b/packages/flutter/lib/src/widgets/debug.dart
@@ -315,7 +315,7 @@ debugPrintGlobalKeyedWidgetLifecycle || debugProfileBuildsEnabled || debugHighlightDeprecatedWidgets) { - throw FlutterError.fromParts(<DiagnosticsNode>[ErrorSummary(reason)]); + throw FlutterError.fromParts(<DiagnosticsNode>[ErrorSummary('$reason')]); } return true; }());
diff --git a/packages/flutter/lib/src/widgets/draggable_scrollable_sheet.dart b/packages/flutter/lib/src/widgets/draggable_scrollable_sheet.dart index 7534964..71d3b29 100644 --- a/packages/flutter/lib/src/widgets/draggable_scrollable_sheet.dart +++ b/packages/flutter/lib/src/widgets/draggable_scrollable_sheet.dart
@@ -476,7 +476,7 @@ ); final AnimationController ballisticController = AnimationController.unbounded( - debugLabel: objectRuntimeType(this, '_DraggableScrollableSheetPosition'), + debugLabel: '${objectRuntimeType(this, '_DraggableScrollableSheetPosition')}', vsync: context.vsync, ); double lastDelta = 0;
diff --git a/packages/flutter/lib/src/widgets/framework.dart b/packages/flutter/lib/src/widgets/framework.dart index 3b6ef7d..f63eb78 100644 --- a/packages/flutter/lib/src/widgets/framework.dart +++ b/packages/flutter/lib/src/widgets/framework.dart
@@ -442,8 +442,7 @@ /// A short, textual description of this widget. @override String toStringShort() { - final String type = objectRuntimeType(this, 'Widget'); - return key == null ? type : '$type-$key'; + return key == null ? '${objectRuntimeType(this, 'Widget')}' : '${objectRuntimeType(this, 'Widget')}-$key'; } @override @@ -3897,7 +3896,7 @@ /// A short, textual description of this element. @override String toStringShort() { - return widget != null ? widget.toStringShort() : '[${objectRuntimeType(this, 'Element')}]'; + return widget != null ? '${widget.toStringShort()}' : '[${objectRuntimeType(this, 'Element')}]'; } @override
diff --git a/packages/flutter/lib/src/widgets/implicit_animations.dart b/packages/flutter/lib/src/widgets/implicit_animations.dart index a6ba536..efd31e1 100644 --- a/packages/flutter/lib/src/widgets/implicit_animations.dart +++ b/packages/flutter/lib/src/widgets/implicit_animations.dart
@@ -360,7 +360,7 @@ super.initState(); _controller = AnimationController( duration: widget.duration, - debugLabel: kDebugMode ? widget.toStringShort() : null, + debugLabel: kDebugMode ? '${widget.toStringShort()}' : null, vsync: this, ); _controller.addStatusListener((AnimationStatus status) {
diff --git a/packages/flutter/lib/src/widgets/routes.dart b/packages/flutter/lib/src/widgets/routes.dart index c959b52..e0e5073 100644 --- a/packages/flutter/lib/src/widgets/routes.dart +++ b/packages/flutter/lib/src/widgets/routes.dart
@@ -354,7 +354,7 @@ } /// A short description of this route useful for debugging. - String get debugLabel => objectRuntimeType(this, 'TransitionRoute'); + String get debugLabel => '${objectRuntimeType(this, 'TransitionRoute')}'; @override String toString() => '${objectRuntimeType(this, 'TransitionRoute')}(animation: $_controller)';
diff --git a/packages/flutter/lib/src/widgets/scroll_activity.dart b/packages/flutter/lib/src/widgets/scroll_activity.dart index 0ce728c..3487ecf 100644 --- a/packages/flutter/lib/src/widgets/scroll_activity.dart +++ b/packages/flutter/lib/src/widgets/scroll_activity.dart
@@ -507,7 +507,7 @@ TickerProvider vsync, ) : super(delegate) { _controller = AnimationController.unbounded( - debugLabel: kDebugMode ? objectRuntimeType(this, 'BallisticScrollActivity') : null, + debugLabel: kDebugMode ? '${objectRuntimeType(this, 'BallisticScrollActivity')}' : null, vsync: vsync, ) ..addListener(_tick) @@ -604,7 +604,7 @@ _completer = Completer<void>(); _controller = AnimationController.unbounded( value: from, - debugLabel: objectRuntimeType(this, 'DrivenScrollActivity'), + debugLabel: '${objectRuntimeType(this, 'DrivenScrollActivity')}', vsync: vsync, ) ..addListener(_tick)
diff --git a/packages/flutter/lib/src/widgets/scroll_configuration.dart b/packages/flutter/lib/src/widgets/scroll_configuration.dart index f295b18..a3e0d3e 100644 --- a/packages/flutter/lib/src/widgets/scroll_configuration.dart +++ b/packages/flutter/lib/src/widgets/scroll_configuration.dart
@@ -77,7 +77,7 @@ bool shouldNotify(covariant ScrollBehavior oldDelegate) => false; @override - String toString() => objectRuntimeType(this, 'ScrollBehavior'); + String toString() => '${objectRuntimeType(this, 'ScrollBehavior')}'; } /// Controls how [Scrollable] widgets behave in a subtree.
diff --git a/packages/flutter/lib/src/widgets/shortcuts.dart b/packages/flutter/lib/src/widgets/shortcuts.dart index 720b6e6..44caef6 100644 --- a/packages/flutter/lib/src/widgets/shortcuts.dart +++ b/packages/flutter/lib/src/widgets/shortcuts.dart
@@ -156,7 +156,7 @@ return a.debugName.compareTo(b.debugName); } ); - return sortedKeys.map<String>((LogicalKeyboardKey key) => key.debugName).join(' + '); + return sortedKeys.map<String>((LogicalKeyboardKey key) => '${key.debugName}').join(' + '); } @override
diff --git a/packages/flutter/test/material/slider_theme_test.dart b/packages/flutter/test/material/slider_theme_test.dart index 7c71c25..e474a40 100644 --- a/packages/flutter/test/material/slider_theme_test.dart +++ b/packages/flutter/test/material/slider_theme_test.dart
@@ -378,7 +378,7 @@ data: sliderTheme, child: Slider( value: sliderValue, - label: value, + label: '$value', divisions: 3, onChanged: (double d) { }, ),
diff --git a/packages/flutter/test/widgets/semantics_tester.dart b/packages/flutter/test/widgets/semantics_tester.dart index fd66cf7..dc3d2e7 100644 --- a/packages/flutter/test/widgets/semantics_tester.dart +++ b/packages/flutter/test/widgets/semantics_tester.dart
@@ -259,7 +259,7 @@ DebugSemanticsDumpOrder childOrder = DebugSemanticsDumpOrder.inverseHitTest, }) { bool fail(String message) { - matchState[TestSemantics] = message; + matchState[TestSemantics] = '$message'; return false; }
diff --git a/packages/flutter_localizations/test/material/date_picker_test.dart b/packages/flutter_localizations/test/material/date_picker_test.dart index 3b54198..3563f17 100644 --- a/packages/flutter_localizations/test/material/date_picker_test.dart +++ b/packages/flutter_localizations/test/material/date_picker_test.dart
@@ -46,7 +46,7 @@ const Locale('ar', 'AR'): <String, dynamic>{ 'textDirection': TextDirection.rtl, 'expectedDaysOfWeek': <String>['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], - 'expectedDaysOfMonth': List<String>.generate(30, (int i) => arabicNumbers.format(i + 1)), + 'expectedDaysOfMonth': List<String>.generate(30, (int i) => '${arabicNumbers.format(i + 1)}'), 'expectedMonthYearHeader': 'سبتمبر ٢٠١٧', }, };
diff --git a/packages/flutter_test/lib/src/test_async_utils.dart b/packages/flutter_test/lib/src/test_async_utils.dart index 219497d..cd99756 100644 --- a/packages/flutter_test/lib/src/test_async_utils.dart +++ b/packages/flutter_test/lib/src/test_async_utils.dart
@@ -344,14 +344,14 @@ // a 'dart:' API, like from the Future/microtask mechanism, because dart: URLs in the // stack trace don't have a column number and so don't match the regexp above. information.add(ErrorSummary('(Unable to parse the stack frame of the method that called the method that called $_className.$method(). The stack may be incomplete or bogus.)')); - information.add(ErrorDescription(stack[index])); + information.add(ErrorDescription('${stack[index]}')); } } else { information.add(ErrorSummary('(Unable to find the stack frame of the method that called the method that called $_className.$method(). The stack may be incomplete or bogus.)')); } } else { information.add(ErrorSummary('(Unable to parse the stack frame of the method that called $_className.$method(). The stack may be incomplete or bogus.)')); - information.add(ErrorDescription(stack[index])); + information.add(ErrorDescription('${stack[index]}')); } } else { information.add(ErrorSummary('(Unable to find the method that called $_className.$method(). The stack may be incomplete or bogus.)'));
diff --git a/packages/flutter_tools/lib/src/android/android_studio.dart b/packages/flutter_tools/lib/src/android/android_studio.dart index 65cb3e9..f7ebfb4 100644 --- a/packages/flutter_tools/lib/src/android/android_studio.dart +++ b/packages/flutter_tools/lib/src/android/android_studio.dart
@@ -68,7 +68,7 @@ } final String presetPluginsPath = pathsSelectorValue == null ? null - : globals.fs.path.join(homeDirPath, 'Library', 'Application Support', pathsSelectorValue); + : globals.fs.path.join(homeDirPath, 'Library', 'Application Support', '$pathsSelectorValue'); return AndroidStudio(studioPath, version: version, presetPluginsPath: presetPluginsPath); }
diff --git a/packages/flutter_tools/lib/src/build_runner/web_fs.dart b/packages/flutter_tools/lib/src/build_runner/web_fs.dart index 443cab3..977f545 100644 --- a/packages/flutter_tools/lib/src/build_runner/web_fs.dart +++ b/packages/flutter_tools/lib/src/build_runner/web_fs.dart
@@ -455,7 +455,7 @@ flutterProject.dartTool.path, 'build', 'flutter_web', - flutterProject.manifest.appName, + '${flutterProject.manifest.appName}', 'lib', '${targetBaseName}_web_entrypoint.dart.js.tar.gz', ));
diff --git a/packages/flutter_tools/lib/src/cache.dart b/packages/flutter_tools/lib/src/cache.dart index ef96323..7151899 100644 --- a/packages/flutter_tools/lib/src/cache.dart +++ b/packages/flutter_tools/lib/src/cache.dart
@@ -580,7 +580,7 @@ /// Download an archive from the given [url] and unzip it to [location]. Future<void> _downloadArchive(String message, Uri url, Directory location, bool verifier(File f), void extractor(File f, Directory d)) { - return _withDownloadFile(flattenNameSubdirs(url), (File tempFile) async { + return _withDownloadFile('${flattenNameSubdirs(url)}', (File tempFile) async { if (!verifier(tempFile)) { final Status status = globals.logger.startProgress(message, timeout: timeoutConfiguration.slowOperation); try {
diff --git a/packages/flutter_tools/lib/src/commands/update_packages.dart b/packages/flutter_tools/lib/src/commands/update_packages.dart index 30d01e4..9b3a170 100644 --- a/packages/flutter_tools/lib/src/commands/update_packages.dart +++ b/packages/flutter_tools/lib/src/commands/update_packages.dart
@@ -382,7 +382,7 @@ for (_DependencyLink path in paths) { final StringBuffer buf = StringBuffer(); while (path != null) { - buf.write(path.to); + buf.write('${path.to}'); path = path.from; if (path != null) { buf.write(' <- ');
diff --git a/packages/flutter_tools/lib/src/compile.dart b/packages/flutter_tools/lib/src/compile.dart index c001821..cbd4dd4 100644 --- a/packages/flutter_tools/lib/src/compile.dart +++ b/packages/flutter_tools/lib/src/compile.dart
@@ -605,9 +605,8 @@ _server.stdin.writeln('recompile $mainUri$inputKey'); globals.printTrace('<- recompile $mainUri$inputKey'); for (final Uri fileUri in request.invalidatedFiles) { - final String message = _mapFileUri(fileUri.toString(), packageUriMapper); - _server.stdin.writeln(message); - globals.printTrace(message); + _server.stdin.writeln(_mapFileUri(fileUri.toString(), packageUriMapper)); + globals.printTrace('${_mapFileUri(fileUri.toString(), packageUriMapper)}'); } _server.stdin.writeln(inputKey); globals.printTrace('<- $inputKey');
diff --git a/packages/flutter_tools/lib/src/device.dart b/packages/flutter_tools/lib/src/device.dart index b1805b9..debd75a 100644 --- a/packages/flutter_tools/lib/src/device.dart +++ b/packages/flutter_tools/lib/src/device.dart
@@ -468,7 +468,7 @@ table.add(<String>[ device.name, device.id, - getNameForTargetPlatform(targetPlatform), + '${getNameForTargetPlatform(targetPlatform)}', '${await device.sdkNameAndVersion}$supportIndicator', ]); }
diff --git a/packages/flutter_tools/lib/src/ios/devices.dart b/packages/flutter_tools/lib/src/ios/devices.dart index e92c05e..c9b4341 100644 --- a/packages/flutter_tools/lib/src/ios/devices.dart +++ b/packages/flutter_tools/lib/src/ios/devices.dart
@@ -50,7 +50,7 @@ '--justlaunch', if (launchArguments.isNotEmpty) ...<String>[ '--args', - launchArguments.join(' '), + '${launchArguments.join(" ")}', ], ];
diff --git a/packages/flutter_tools/lib/src/ios/mac.dart b/packages/flutter_tools/lib/src/ios/mac.dart index 1fd62bb..977a1e5 100644 --- a/packages/flutter_tools/lib/src/ios/mac.dart +++ b/packages/flutter_tools/lib/src/ios/mac.dart
@@ -473,7 +473,7 @@ initialBuildStatus = null; globals.printStatus( 'Xcode build done.'.padRight(kDefaultStatusPadding + 1) - + getElapsedAsSeconds(sw.elapsed).padLeft(5), + + '${getElapsedAsSeconds(sw.elapsed).padLeft(5)}', ); flutterUsage.sendTiming('build', 'xcode-ios', Duration(milliseconds: sw.elapsedMilliseconds));
diff --git a/packages/flutter_tools/lib/src/macos/build_macos.dart b/packages/flutter_tools/lib/src/macos/build_macos.dart index 0e560ee..a18fd1b 100644 --- a/packages/flutter_tools/lib/src/macos/build_macos.dart +++ b/packages/flutter_tools/lib/src/macos/build_macos.dart
@@ -79,7 +79,7 @@ 'xcrun', 'xcodebuild', '-workspace', flutterProject.macos.xcodeWorkspace.path, - '-configuration', configuration, + '-configuration', '$configuration', '-scheme', 'Runner', '-derivedDataPath', flutterBuildDir.absolute.path, 'OBJROOT=${globals.fs.path.join(flutterBuildDir.absolute.path, 'Build', 'Intermediates.noindex')}',
diff --git a/packages/flutter_tools/lib/src/reporting/events.dart b/packages/flutter_tools/lib/src/reporting/events.dart index 3bf8139..626629c 100644 --- a/packages/flutter_tools/lib/src/reporting/events.dart +++ b/packages/flutter_tools/lib/src/reporting/events.dart
@@ -139,9 +139,9 @@ // category 'build', // parameter - FlutterCommand.current == null - ? 'unspecified' - : FlutterCommand.current.name, + FlutterCommand.current == null ? + 'unspecified' : + '${FlutterCommand.current.name}', label: label, );
diff --git a/packages/flutter_tools/lib/src/test/test_compiler.dart b/packages/flutter_tools/lib/src/test/test_compiler.dart index a876544..30e9097 100644 --- a/packages/flutter_tools/lib/src/test/test_compiler.dart +++ b/packages/flutter_tools/lib/src/test/test_compiler.dart
@@ -186,6 +186,6 @@ _suppressOutput = true; return; } - globals.printError(message); + globals.printError('$message'); } }
diff --git a/packages/flutter_tools/test/general.shard/build_system/targets/macos_test.dart b/packages/flutter_tools/test/general.shard/build_system/targets/macos_test.dart index f7d7912..9daa2c5 100644 --- a/packages/flutter_tools/test/general.shard/build_system/targets/macos_test.dart +++ b/packages/flutter_tools/test/general.shard/build_system/targets/macos_test.dart
@@ -115,7 +115,7 @@ }); await const DebugUnpackMacOS().build(environment); - expect(globals.fs.directory(_kOutputPrefix).existsSync(), true); + expect(globals.fs.directory('$_kOutputPrefix').existsSync(), true); for (final File file in inputs) { expect(globals.fs.file(file.path.replaceFirst(_kInputPrefix, _kOutputPrefix)).existsSync(), true); }
diff --git a/packages/flutter_tools/test/general.shard/runner/flutter_command_runner_test.dart b/packages/flutter_tools/test/general.shard/runner/flutter_command_runner_test.dart index bb6104f..a5a6460 100644 --- a/packages/flutter_tools/test/general.shard/runner/flutter_command_runner_test.dart +++ b/packages/flutter_tools/test/general.shard/runner/flutter_command_runner_test.dart
@@ -107,7 +107,7 @@ await runner.run(<String>['dummy', '--local-engine=ios_debug']); // Verify that this also works if the sky_engine path is a symlink to the engine root. - fs.link('/symlink').createSync(_kArbitraryEngineRoot); + fs.link('/symlink').createSync('$_kArbitraryEngineRoot'); fs.file(_kDotPackages).writeAsStringSync('sky_engine:file:///symlink/src/out/ios_debug/gen/dart-pkg/sky_engine/lib/'); await runner.run(<String>['dummy', '--local-engine=ios_debug']); }, overrides: <Type, Generator>{