Unverified Commit 4bb68400 authored by Alexandre Ardhuin's avatar Alexandre Ardhuin Committed by GitHub

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

parent 295e5669
...@@ -272,7 +272,7 @@ String generateTranslationBundles() { ...@@ -272,7 +272,7 @@ String generateTranslationBundles() {
/// ///
/// * [getMaterialTranslation], whose documentation describes these values. /// * [getMaterialTranslation], whose documentation describes these values.
final Set<String> kSupportedLanguages = HashSet<String>.from(const <String>[ 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`. /// Creates a [GlobalMaterialLocalizations] instance for the given `locale`.
......
...@@ -217,10 +217,10 @@ void generate(String commit) { ...@@ -217,10 +217,10 @@ void generate(String commit) {
<String, String>{ <String, String>{
'imports': samples.map<String>((SampleInfo page) { 'imports': samples.map<String>((SampleInfo page) {
return "import '${page.importPath}' show ${page.sampleClass};\n"; return "import '${page.importPath}' show ${page.sampleClass};\n";
}).toList().join(), }).join(),
'widgets': samples.map<String>((SampleInfo sample) { 'widgets': samples.map<String>((SampleInfo sample) {
return 'new ${sample.sampleClass}(),\n'; return 'new ${sample.sampleClass}(),\n';
}).toList().join(), }).join(),
}, },
); );
...@@ -232,7 +232,7 @@ void generate(String commit) { ...@@ -232,7 +232,7 @@ void generate(String commit) {
<String, String>{ <String, String>{
'paths': samples.map<String>((SampleInfo sample) { 'paths': samples.map<String>((SampleInfo sample) {
return "'${outputFile(sample.sourceName + '.png').path}'"; return "'${outputFile(sample.sourceName + '.png').path}'";
}).toList().join(',\n'), }).join(',\n'),
}, },
); );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment