remove unnecessary string interpolations (#49352)

This commit is contained in:
Alexandre Ardhuin
2020-01-24 05:43:01 +01:00
committed by Flutter GitHub Bot
parent 5d532e42fb
commit 92cbaa3efe
56 changed files with 79 additions and 77 deletions

View File

@@ -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');
}

View File

@@ -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);

View File

@@ -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)) {

View File

@@ -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]),
),
],

View File

@@ -25,7 +25,7 @@ class CodeGenerator {
currentLine += ' $word';
} else {
result.writeln('$prefix$currentLine');
currentLine = '$word';
currentLine = word;
}
}
if (currentLine.isNotEmpty) {

View File

@@ -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) {