mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
remove unnecessary string interpolations (#49622)
This commit is contained in:
parent
275ec45ec4
commit
b5f328e37e
@ -29,7 +29,7 @@ class _StockSymbolView extends StatelessWidget {
|
||||
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 @@ class _StockSymbolView extends StatelessWidget {
|
||||
height: 8.0
|
||||
),
|
||||
Text('Market Cap', style: headings),
|
||||
Text('${stock.marketCap}'),
|
||||
Text(stock.marketCap),
|
||||
Container(
|
||||
height: 8.0
|
||||
),
|
||||
|
@ -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');
|
||||
}
|
||||
|
@ -272,7 +272,7 @@ Future<bool> shell(String command, Directory directory, { bool verbose = false,
|
||||
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);
|
||||
|
@ -51,7 +51,7 @@ void main() {
|
||||
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)) {
|
||||
|
@ -246,7 +246,7 @@ class _OptionsState extends State<Options> {
|
||||
),
|
||||
),
|
||||
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<Options> {
|
||||
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<Options> {
|
||||
),
|
||||
),
|
||||
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<Options> {
|
||||
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<Options> {
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'${widget.model.density.vertical.toStringAsFixed(3)}',
|
||||
widget.model.density.vertical.toStringAsFixed(3),
|
||||
style: TextStyle(color: Colors.grey[50]),
|
||||
),
|
||||
],
|
||||
|
@ -25,7 +25,7 @@ class CodeGenerator {
|
||||
currentLine += ' $word';
|
||||
} else {
|
||||
result.writeln('$prefix$currentLine');
|
||||
currentLine = '$word';
|
||||
currentLine = word;
|
||||
}
|
||||
}
|
||||
if (currentLine.isNotEmpty) {
|
||||
|
@ -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) {
|
||||
|
@ -202,7 +202,7 @@ void generate(String commit) {
|
||||
outputFile('${className}_index.md'),
|
||||
inputFile('bin', 'class_index.md.template').readAsStringSync(),
|
||||
<String, String>{
|
||||
'class': '$className',
|
||||
'class': className,
|
||||
'entries': entries.join('\n'),
|
||||
'link': '${className}_index',
|
||||
},
|
||||
|
@ -113,11 +113,11 @@ class DessertDataSource extends DataTableSource {
|
||||
}
|
||||
},
|
||||
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}%')),
|
||||
|
@ -83,7 +83,7 @@ class DateTimeItem extends StatelessWidget {
|
||||
},
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
Text('${time.format(context)}'),
|
||||
Text(time.format(context)),
|
||||
const Icon(Icons.arrow_drop_down, color: Colors.black54),
|
||||
],
|
||||
),
|
||||
|
@ -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,
|
||||
|
@ -231,7 +231,7 @@ class _ThemeModeItem extends StatelessWidget {
|
||||
children: <Widget>[
|
||||
const Text('Theme'),
|
||||
Text(
|
||||
'${modeLabels[options.themeMode]}',
|
||||
modeLabels[options.themeMode],
|
||||
style: Theme.of(context).primaryTextTheme.bodyText2,
|
||||
),
|
||||
],
|
||||
@ -278,7 +278,7 @@ class _TextScaleFactorItem extends StatelessWidget {
|
||||
children: <Widget>[
|
||||
const Text('Text size'),
|
||||
Text(
|
||||
'${options.textScaleFactor.label}',
|
||||
options.textScaleFactor.label,
|
||||
style: Theme.of(context).primaryTextTheme.bodyText2,
|
||||
),
|
||||
],
|
||||
@ -324,7 +324,7 @@ class _VisualDensityItem extends StatelessWidget {
|
||||
children: <Widget>[
|
||||
const Text('Visual density'),
|
||||
Text(
|
||||
'${options.visualDensity.label}',
|
||||
options.visualDensity.label,
|
||||
style: Theme.of(context).primaryTextTheme.bodyText2,
|
||||
),
|
||||
],
|
||||
@ -431,7 +431,7 @@ class _PlatformItem extends StatelessWidget {
|
||||
children: <Widget>[
|
||||
const Text('Platform mechanics'),
|
||||
Text(
|
||||
'${_platformLabel(options.platform)}',
|
||||
_platformLabel(options.platform),
|
||||
style: Theme.of(context).primaryTextTheme.bodyText2,
|
||||
),
|
||||
],
|
||||
|
@ -207,6 +207,6 @@ abstract class Animation<T> extends Listenable implements ValueListenable<T> {
|
||||
break;
|
||||
}
|
||||
assert(icon != null);
|
||||
return '$icon';
|
||||
return icon;
|
||||
}
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ abstract class ParametricCurve<T> {
|
||||
}
|
||||
|
||||
@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
|
||||
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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 &&
|
||||
|
@ -134,7 +134,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}]';
|
||||
|
@ -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 {
|
||||
|
@ -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.
|
||||
|
@ -571,7 +571,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
|
||||
|
@ -440,7 +440,7 @@ class TextSpan extends InlineSpan {
|
||||
);
|
||||
|
||||
@override
|
||||
String toStringShort() => '${objectRuntimeType(this, 'TextSpan')}';
|
||||
String toStringShort() => objectRuntimeType(this, 'TextSpan');
|
||||
|
||||
@override
|
||||
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
|
||||
|
@ -1197,7 +1197,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
|
||||
|
@ -54,5 +54,5 @@ abstract class Simulation {
|
||||
Tolerance tolerance;
|
||||
|
||||
@override
|
||||
String toString() => '${objectRuntimeType(this, 'Simulation')}';
|
||||
String toString() => objectRuntimeType(this, 'Simulation');
|
||||
}
|
||||
|
@ -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.
|
||||
|
@ -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].
|
||||
|
@ -1138,7 +1138,7 @@ abstract class CustomClipper<T> {
|
||||
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].
|
||||
|
@ -759,7 +759,7 @@ class SliverGeometry extends Diagnosticable {
|
||||
}
|
||||
|
||||
@override
|
||||
String toStringShort() => '${objectRuntimeType(this, 'SliverGeometry')}';
|
||||
String toStringShort() => objectRuntimeType(this, 'SliverGeometry');
|
||||
|
||||
@override
|
||||
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
|
||||
|
@ -76,7 +76,7 @@ abstract class TableColumnWidth {
|
||||
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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -315,7 +315,7 @@ bool debugAssertAllWidgetVarsUnset(String reason) {
|
||||
debugPrintGlobalKeyedWidgetLifecycle ||
|
||||
debugProfileBuildsEnabled ||
|
||||
debugHighlightDeprecatedWidgets) {
|
||||
throw FlutterError.fromParts(<DiagnosticsNode>[ErrorSummary('$reason')]);
|
||||
throw FlutterError.fromParts(<DiagnosticsNode>[ErrorSummary(reason)]);
|
||||
}
|
||||
return true;
|
||||
}());
|
||||
|
@ -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;
|
||||
|
@ -443,7 +443,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
|
||||
@ -3958,7 +3959,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
|
||||
|
@ -360,7 +360,7 @@ abstract class ImplicitlyAnimatedWidgetState<T extends ImplicitlyAnimatedWidget>
|
||||
super.initState();
|
||||
_controller = AnimationController(
|
||||
duration: widget.duration,
|
||||
debugLabel: kDebugMode ? '${widget.toStringShort()}' : null,
|
||||
debugLabel: kDebugMode ? widget.toStringShort() : null,
|
||||
vsync: this,
|
||||
);
|
||||
_controller.addStatusListener((AnimationStatus status) {
|
||||
|
@ -363,7 +363,7 @@ abstract class TransitionRoute<T> extends OverlayRoute<T> {
|
||||
}
|
||||
|
||||
/// 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)';
|
||||
|
@ -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<void>();
|
||||
_controller = AnimationController.unbounded(
|
||||
value: from,
|
||||
debugLabel: '${objectRuntimeType(this, 'DrivenScrollActivity')}',
|
||||
debugLabel: objectRuntimeType(this, 'DrivenScrollActivity'),
|
||||
vsync: vsync,
|
||||
)
|
||||
..addListener(_tick)
|
||||
|
@ -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.
|
||||
|
@ -156,7 +156,7 @@ class LogicalKeySet extends KeySet<LogicalKeyboardKey> with DiagnosticableMixin
|
||||
return a.debugName.compareTo(b.debugName);
|
||||
}
|
||||
);
|
||||
return sortedKeys.map<String>((LogicalKeyboardKey key) => '${key.debugName}').join(' + ');
|
||||
return sortedKeys.map<String>((LogicalKeyboardKey key) => key.debugName.toString()).join(' + ');
|
||||
}
|
||||
|
||||
@override
|
||||
|
@ -378,7 +378,7 @@ void main() {
|
||||
data: sliderTheme,
|
||||
child: Slider(
|
||||
value: sliderValue,
|
||||
label: '$value',
|
||||
label: value,
|
||||
divisions: 3,
|
||||
onChanged: (double d) { },
|
||||
),
|
||||
|
@ -259,7 +259,7 @@ class TestSemantics {
|
||||
DebugSemanticsDumpOrder childOrder = DebugSemanticsDumpOrder.inverseHitTest,
|
||||
}) {
|
||||
bool fail(String message) {
|
||||
matchState[TestSemantics] = '$message';
|
||||
matchState[TestSemantics] = message;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -46,7 +46,7 @@ void main() {
|
||||
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': 'سبتمبر ٢٠١٧',
|
||||
},
|
||||
};
|
||||
|
@ -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.)'));
|
||||
|
@ -68,7 +68,7 @@ class AndroidStudio implements Comparable<AndroidStudio> {
|
||||
}
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -451,7 +451,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',
|
||||
));
|
||||
|
@ -580,7 +580,7 @@ abstract class CachedArtifact extends ArtifactSet {
|
||||
|
||||
/// 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 {
|
||||
|
@ -382,7 +382,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(' <- ');
|
||||
|
@ -605,8 +605,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');
|
||||
|
@ -468,7 +468,7 @@ abstract class Device {
|
||||
table.add(<String>[
|
||||
device.name,
|
||||
device.id,
|
||||
'${getNameForTargetPlatform(targetPlatform)}',
|
||||
getNameForTargetPlatform(targetPlatform),
|
||||
'${await device.sdkNameAndVersion}$supportIndicator',
|
||||
]);
|
||||
}
|
||||
|
@ -50,7 +50,7 @@ class IOSDeploy {
|
||||
'--justlaunch',
|
||||
if (launchArguments.isNotEmpty) ...<String>[
|
||||
'--args',
|
||||
'${launchArguments.join(" ")}',
|
||||
launchArguments.join(' '),
|
||||
],
|
||||
];
|
||||
|
||||
|
@ -469,7 +469,7 @@ Future<XcodeBuildResult> 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));
|
||||
|
||||
|
@ -79,7 +79,7 @@ Future<void> 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')}',
|
||||
|
@ -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,
|
||||
);
|
||||
|
||||
|
@ -186,6 +186,6 @@ class TestCompiler {
|
||||
_suppressOutput = true;
|
||||
return;
|
||||
}
|
||||
globals.printError('$message');
|
||||
globals.printError(message);
|
||||
}
|
||||
}
|
||||
|
@ -115,7 +115,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);
|
||||
}
|
||||
|
@ -107,7 +107,7 @@ void main() {
|
||||
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>{
|
||||
|
Loading…
Reference in New Issue
Block a user