diff --git a/dev/bots/unpublish_package.dart b/dev/bots/unpublish_package.dart index 581cd8f66c..5385ec2b22 100644 --- a/dev/bots/unpublish_package.dart +++ b/dev/bots/unpublish_package.dart @@ -391,7 +391,7 @@ void _printBanner(String message) { 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 62133a4fd9..4a662ba830 100644 --- a/dev/customer_testing/run_tests.dart +++ b/dev/customer_testing/run_tests.dart @@ -272,7 +272,7 @@ Future shell(String command, Directory directory, { bool verbose = false, print('>> $command'); Process process; if (Platform.isWindows) { - process = await Process.start('CMD.EXE', ['/S', '/C', '$command'], workingDirectory: directory.path); + process = await Process.start('CMD.EXE', ['/S', '/C', command], workingDirectory: directory.path); } else { final List 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 ff2feb6477..cc228013ed 100644 --- a/dev/devicelab/bin/tasks/named_isolates_test.dart +++ b/dev/devicelab/bin/tasks/named_isolates_test.dart @@ -51,7 +51,7 @@ void main() { print('Extracted observatory port: $observatoryUri'); final Process attachProcess = await _run(device: device, command: ['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/manual_tests/lib/density.dart b/dev/manual_tests/lib/density.dart index 6c94ffc74c..b49d4d42a9 100644 --- a/dev/manual_tests/lib/density.dart +++ b/dev/manual_tests/lib/density.dart @@ -246,7 +246,7 @@ class _OptionsState extends State { ), ), Text( - '${widget.model.size.toStringAsFixed(3)}', + widget.model.size.toStringAsFixed(3), style: TextStyle(color: Colors.grey[50]), ), ], @@ -261,7 +261,7 @@ class _OptionsState extends State { 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 @@ class _OptionsState extends State { ), ), Text( - '${widget.model.density.horizontal.toStringAsFixed(3)}', + widget.model.density.horizontal.toStringAsFixed(3), style: TextStyle(color: Colors.grey[50]), ), ], @@ -287,7 +287,7 @@ class _OptionsState extends State { 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 @@ class _OptionsState extends State { ), ), 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 c7f006a18f..7d80476130 100644 --- a/dev/tools/gen_keycodes/lib/code_gen.dart +++ b/dev/tools/gen_keycodes/lib/code_gen.dart @@ -25,7 +25,7 @@ class CodeGenerator { 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 9813d4334e..4c0ae2c305 100644 --- a/dev/tools/localization/localizations_utils.dart +++ b/dev/tools/localization/localizations_utils.dart @@ -339,7 +339,7 @@ String describeLocale(String tag) { 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 852e7180af..6e1ae655a3 100644 --- a/examples/catalog/bin/sample_page.dart +++ b/examples/catalog/bin/sample_page.dart @@ -202,7 +202,7 @@ void generate(String commit) { outputFile('${className}_index.md'), inputFile('bin', 'class_index.md.template').readAsStringSync(), { - '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 da59408583..507c181131 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 @@ class DessertDataSource extends DataTableSource { } }, cells: [ - 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 cc73276e36..fc3ac59998 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 @@ class DateTimeItem extends StatelessWidget { }, child: Row( children: [ - 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 13cfa8b334..d0c005fd1a 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 @@ class _CardDataItem extends StatelessWidget { 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 c6dfac6645..36e10da192 100644 --- a/examples/flutter_gallery/lib/gallery/options.dart +++ b/examples/flutter_gallery/lib/gallery/options.dart @@ -231,7 +231,7 @@ class _ThemeModeItem extends StatelessWidget { children: [ const Text('Theme'), Text( - '${modeLabels[options.themeMode]}', + modeLabels[options.themeMode], style: Theme.of(context).primaryTextTheme.body1, ), ], @@ -278,7 +278,7 @@ class _TextScaleFactorItem extends StatelessWidget { children: [ const Text('Text size'), Text( - '${options.textScaleFactor.label}', + options.textScaleFactor.label, style: Theme.of(context).primaryTextTheme.body1, ), ], @@ -324,7 +324,7 @@ class _VisualDensityItem extends StatelessWidget { children: [ const Text('Visual density'), Text( - '${options.visualDensity.label}', + options.visualDensity.label, style: Theme.of(context).primaryTextTheme.body1, ), ], @@ -431,7 +431,7 @@ class _PlatformItem extends StatelessWidget { children: [ const Text('Platform mechanics'), Text( - '${_platformLabel(options.platform)}', + _platformLabel(options.platform), style: Theme.of(context).primaryTextTheme.body1, ), ], diff --git a/examples/stocks/lib/stock_symbol_viewer.dart b/examples/stocks/lib/stock_symbol_viewer.dart index 5272aaefe5..26d0d860f1 100644 --- a/examples/stocks/lib/stock_symbol_viewer.dart +++ b/examples/stocks/lib/stock_symbol_viewer.dart @@ -29,7 +29,7 @@ class _StockSymbolView extends StatelessWidget { Row( children: [ Text( - '${stock.symbol}', + stock.symbol, key: ValueKey('${stock.symbol}_symbol_name'), style: Theme.of(context).textTheme.display2, ), @@ -43,7 +43,7 @@ class _StockSymbolView extends StatelessWidget { 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 9f6785528b..b1cfaa370e 100644 --- a/packages/flutter/lib/src/animation/animation.dart +++ b/packages/flutter/lib/src/animation/animation.dart @@ -207,6 +207,6 @@ abstract class Animation extends Listenable implements ValueListenable { 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 c5502c2ef0..4e3c474dd0 100644 --- a/packages/flutter/lib/src/animation/curves.dart +++ b/packages/flutter/lib/src/animation/curves.dart @@ -46,7 +46,7 @@ abstract class ParametricCurve { } @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 57f6b4a233..f6ca5d4d5a 100644 --- a/packages/flutter/lib/src/foundation/_isolates_io.dart +++ b/packages/flutter/lib/src/foundation/_isolates_io.dart @@ -80,7 +80,7 @@ class _IsolateConfiguration { Future _spawn(_IsolateConfiguration> configuration) async { R result; await Timeline.timeSync( - '${configuration.debugLabel}', + configuration.debugLabel, () async { result = await configuration.apply(); }, flow: Flow.step(configuration.flowId), ); diff --git a/packages/flutter/lib/src/foundation/assertions.dart b/packages/flutter/lib/src/foundation/assertions.dart index 9154267469..34a9c54bb7 100644 --- a/packages/flutter/lib/src/foundation/assertions.dart +++ b/packages/flutter/lib/src/foundation/assertions.dart @@ -381,7 +381,7 @@ class FlutterErrorDetails extends Diagnosticable { 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 @@ class FlutterErrorDetails extends Diagnosticable { 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 118e1d071f..56355581d1 100644 --- a/packages/flutter/lib/src/foundation/diagnostics.dart +++ b/packages/flutter/lib/src/foundation/diagnostics.dart @@ -1277,7 +1277,7 @@ class TextTreeRenderer { // 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 @@ class TextTreeRenderer { 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 c8e42c125a..5e169ee64d 100644 --- a/packages/flutter/lib/src/gestures/mouse_tracking.dart +++ b/packages/flutter/lib/src/gestures/mouse_tracking.dart @@ -174,7 +174,7 @@ class _MouseState { @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 533eaf2aa3..fd1ec08503 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 @@ abstract class FloatingActionButtonLocation { 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 @@ abstract class FloatingActionButtonAnimator { 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 03e665a311..a629ce7b39 100644 --- a/packages/flutter/lib/src/painting/decoration.dart +++ b/packages/flutter/lib/src/painting/decoration.dart @@ -26,7 +26,7 @@ abstract class Decoration extends Diagnosticable { 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 a49a043065..eba4bbb683 100644 --- a/packages/flutter/lib/src/painting/strut_style.dart +++ b/packages/flutter/lib/src/painting/strut_style.dart @@ -570,7 +570,7 @@ class StrutStyle extends Diagnosticable { } @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 a174b4c8cd..2387294203 100644 --- a/packages/flutter/lib/src/painting/text_span.dart +++ b/packages/flutter/lib/src/painting/text_span.dart @@ -440,7 +440,7 @@ class TextSpan extends InlineSpan { ); @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 be50003f0c..f84063f2b0 100644 --- a/packages/flutter/lib/src/painting/text_style.dart +++ b/packages/flutter/lib/src/painting/text_style.dart @@ -1195,7 +1195,7 @@ class TextStyle extends Diagnosticable { } @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 9a9f665291..fc6732185e 100644 --- a/packages/flutter/lib/src/physics/simulation.dart +++ b/packages/flutter/lib/src/physics/simulation.dart @@ -54,5 +54,5 @@ abstract class Simulation { 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 af8ee03478..71dd11277d 100644 --- a/packages/flutter/lib/src/rendering/custom_layout.dart +++ b/packages/flutter/lib/src/rendering/custom_layout.dart @@ -294,7 +294,7 @@ abstract class MultiChildLayoutDelegate { /// /// 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 dcc9d53090..15b1447931 100644 --- a/packages/flutter/lib/src/rendering/flow.dart +++ b/packages/flutter/lib/src/rendering/flow.dart @@ -132,7 +132,7 @@ abstract class FlowDelegate { /// /// 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 a5d4bf4e3e..af1ea37287 100644 --- a/packages/flutter/lib/src/rendering/proxy_box.dart +++ b/packages/flutter/lib/src/rendering/proxy_box.dart @@ -1138,7 +1138,7 @@ abstract class CustomClipper { bool shouldReclip(covariant CustomClipper 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 d56720c96b..bd3be14ced 100644 --- a/packages/flutter/lib/src/rendering/sliver.dart +++ b/packages/flutter/lib/src/rendering/sliver.dart @@ -759,7 +759,7 @@ class SliverGeometry extends Diagnosticable { } @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 b7ca6c4057..f627f952e0 100644 --- a/packages/flutter/lib/src/rendering/table.dart +++ b/packages/flutter/lib/src/rendering/table.dart @@ -76,7 +76,7 @@ abstract class TableColumnWidth { double flex(Iterable 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 d32541ae2e..609219e360 100644 --- a/packages/flutter/lib/src/semantics/semantics.dart +++ b/packages/flutter/lib/src/semantics/semantics.dart @@ -376,7 +376,7 @@ class SemanticsData extends Diagnosticable { 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 @@ class SemanticsProperties extends DiagnosticableTree { } @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 7a22f3a248..2ecaf78707 100644 --- a/packages/flutter/lib/src/widgets/basic.dart +++ b/packages/flutter/lib/src/widgets/basic.dart @@ -2099,9 +2099,9 @@ class SizedBox extends SingleChildRenderObjectWidget { } 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 79a8746fe9..e61374721e 100644 --- a/packages/flutter/lib/src/widgets/debug.dart +++ b/packages/flutter/lib/src/widgets/debug.dart @@ -315,7 +315,7 @@ bool debugAssertAllWidgetVarsUnset(String reason) { debugPrintGlobalKeyedWidgetLifecycle || debugProfileBuildsEnabled || debugHighlightDeprecatedWidgets) { - throw FlutterError.fromParts([ErrorSummary('$reason')]); + throw FlutterError.fromParts([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 71d3b29d11..753496495d 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 @@ class _DraggableScrollableSheetScrollPosition ); 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 f63eb78a43..3b6ef7de97 100644 --- a/packages/flutter/lib/src/widgets/framework.dart +++ b/packages/flutter/lib/src/widgets/framework.dart @@ -442,7 +442,8 @@ abstract class Widget extends DiagnosticableTree { /// A short, textual description of this widget. @override String toStringShort() { - return key == null ? '${objectRuntimeType(this, 'Widget')}' : '${objectRuntimeType(this, 'Widget')}-$key'; + final String type = objectRuntimeType(this, 'Widget'); + return key == null ? type : '$type-$key'; } @override @@ -3896,7 +3897,7 @@ abstract class Element extends DiagnosticableTree implements BuildContext { /// 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 efd31e1da2..a6ba5360d5 100644 --- a/packages/flutter/lib/src/widgets/implicit_animations.dart +++ b/packages/flutter/lib/src/widgets/implicit_animations.dart @@ -360,7 +360,7 @@ abstract class ImplicitlyAnimatedWidgetState 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 e0e5073991..c959b525a2 100644 --- a/packages/flutter/lib/src/widgets/routes.dart +++ b/packages/flutter/lib/src/widgets/routes.dart @@ -354,7 +354,7 @@ abstract class TransitionRoute extends OverlayRoute { } /// 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 3487ecf4dc..0ce728c430 100644 --- a/packages/flutter/lib/src/widgets/scroll_activity.dart +++ b/packages/flutter/lib/src/widgets/scroll_activity.dart @@ -507,7 +507,7 @@ class BallisticScrollActivity extends ScrollActivity { 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 @@ class DrivenScrollActivity extends ScrollActivity { _completer = Completer(); _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 a3e0d3ea2d..f295b18a59 100644 --- a/packages/flutter/lib/src/widgets/scroll_configuration.dart +++ b/packages/flutter/lib/src/widgets/scroll_configuration.dart @@ -77,7 +77,7 @@ class ScrollBehavior { 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 44caef6279..720b6e6d1d 100644 --- a/packages/flutter/lib/src/widgets/shortcuts.dart +++ b/packages/flutter/lib/src/widgets/shortcuts.dart @@ -156,7 +156,7 @@ class LogicalKeySet extends KeySet with DiagnosticableMixin return a.debugName.compareTo(b.debugName); } ); - return sortedKeys.map((LogicalKeyboardKey key) => '${key.debugName}').join(' + '); + return sortedKeys.map((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 d706057401..875787317c 100644 --- a/packages/flutter/test/material/slider_theme_test.dart +++ b/packages/flutter/test/material/slider_theme_test.dart @@ -378,7 +378,7 @@ void main() { 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 dc3d2e71ee..fd66cf7aea 100644 --- a/packages/flutter/test/widgets/semantics_tester.dart +++ b/packages/flutter/test/widgets/semantics_tester.dart @@ -259,7 +259,7 @@ class TestSemantics { 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 3563f17455..3b54198e0d 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 @@ void main() { const Locale('ar', 'AR'): { 'textDirection': TextDirection.rtl, 'expectedDaysOfWeek': ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], - 'expectedDaysOfMonth': List.generate(30, (int i) => '${arabicNumbers.format(i + 1)}'), + 'expectedDaysOfMonth': List.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 cd99756cb9..219497df62 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 @@ class TestAsyncUtils { // 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 f7ebfb4287..65cb3e9e3c 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 @@ class AndroidStudio implements Comparable { } 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 977f545ea5..443cab3673 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 @@ class DebugAssetServer extends AssetServer { 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 8c250b3f95..9c4805a915 100644 --- a/packages/flutter_tools/lib/src/cache.dart +++ b/packages/flutter_tools/lib/src/cache.dart @@ -555,7 +555,7 @@ abstract class CachedArtifact extends ArtifactSet { /// Download an archive from the given [url] and unzip it to [location]. Future _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 98e7453d22..7e398cb759 100644 --- a/packages/flutter_tools/lib/src/commands/update_packages.dart +++ b/packages/flutter_tools/lib/src/commands/update_packages.dart @@ -367,7 +367,7 @@ class UpdatePackagesCommand extends FlutterCommand { 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 af7ce54acd..aa2a73977d 100644 --- a/packages/flutter_tools/lib/src/compile.dart +++ b/packages/flutter_tools/lib/src/compile.dart @@ -609,8 +609,9 @@ class DefaultResidentCompiler implements ResidentCompiler { _server.stdin.writeln('recompile $mainUri$inputKey'); globals.printTrace('<- recompile $mainUri$inputKey'); for (final Uri fileUri in request.invalidatedFiles) { - _server.stdin.writeln(_mapFileUri(fileUri.toString(), packageUriMapper)); - globals.printTrace('${_mapFileUri(fileUri.toString(), packageUriMapper)}'); + final String message = _mapFileUri(fileUri.toString(), packageUriMapper); + _server.stdin.writeln(message); + globals.printTrace(message); } _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 debd75a5b5..b1805b961e 100644 --- a/packages/flutter_tools/lib/src/device.dart +++ b/packages/flutter_tools/lib/src/device.dart @@ -468,7 +468,7 @@ abstract class Device { table.add([ 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 c9b4341289..e92c05e25d 100644 --- a/packages/flutter_tools/lib/src/ios/devices.dart +++ b/packages/flutter_tools/lib/src/ios/devices.dart @@ -50,7 +50,7 @@ class IOSDeploy { '--justlaunch', if (launchArguments.isNotEmpty) ...[ '--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 bda9b967c6..8307d911da 100644 --- a/packages/flutter_tools/lib/src/ios/mac.dart +++ b/packages/flutter_tools/lib/src/ios/mac.dart @@ -473,7 +473,7 @@ Future buildXcodeProject({ 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 a18fd1b2a8..0e560ee744 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 @@ Future buildMacOS({ '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 626629c4b6..3bf813905f 100644 --- a/packages/flutter_tools/lib/src/reporting/events.dart +++ b/packages/flutter_tools/lib/src/reporting/events.dart @@ -139,9 +139,9 @@ class BuildEvent extends UsageEvent { // 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 30e90970c9..a876544c02 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 @@ class TestCompiler { _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 e3c86708aa..a642c55611 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 @@ -113,7 +113,7 @@ void main() { }); 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 5517c430a9..af132d30fe 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 @@ -91,7 +91,7 @@ void main() { await runner.run(['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(['dummy', '--local-engine=ios_debug']); }, overrides: {