no need .toList() before .join() (#30304)
This commit is contained in:
committed by
GitHub
parent
295e566989
commit
4bb6840091
@@ -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`.
|
||||
|
||||
@@ -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'),
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user