no need .toList() before .join() (#30304)

This commit is contained in:
Alexandre Ardhuin
2019-04-02 07:20:23 +02:00
committed by GitHub
parent 295e566989
commit 4bb6840091
2 changed files with 4 additions and 4 deletions

View File

@@ -272,7 +272,7 @@ String generateTranslationBundles() {
///
/// * [getMaterialTranslation], whose documentation describes these values.
final Set<String> kSupportedLanguages = HashSet<String>.from(const <String>[
${languageCodes.map<String>((String value) => " '$value', // ${describeLocale(value)}").toList().join('\n')}
${languageCodes.map<String>((String value) => " '$value', // ${describeLocale(value)}").join('\n')}
]);
/// Creates a [GlobalMaterialLocalizations] instance for the given `locale`.

View File

@@ -217,10 +217,10 @@ void generate(String commit) {
<String, String>{
'imports': samples.map<String>((SampleInfo page) {
return "import '${page.importPath}' show ${page.sampleClass};\n";
}).toList().join(),
}).join(),
'widgets': samples.map<String>((SampleInfo sample) {
return 'new ${sample.sampleClass}(),\n';
}).toList().join(),
}).join(),
},
);
@@ -232,7 +232,7 @@ void generate(String commit) {
<String, String>{
'paths': samples.map<String>((SampleInfo sample) {
return "'${outputFile(sample.sourceName + '.png').path}'";
}).toList().join(',\n'),
}).join(',\n'),
},
);