Skip to content

Commit 4bb6840

Browse files
authored
no need .toList() before .join() (flutter#30304)
1 parent 295e566 commit 4bb6840

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

dev/tools/localization/gen_localizations.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ String generateTranslationBundles() {
272272
///
273273
/// * [getMaterialTranslation], whose documentation describes these values.
274274
final Set<String> kSupportedLanguages = HashSet<String>.from(const <String>[
275-
${languageCodes.map<String>((String value) => " '$value', // ${describeLocale(value)}").toList().join('\n')}
275+
${languageCodes.map<String>((String value) => " '$value', // ${describeLocale(value)}").join('\n')}
276276
]);
277277
278278
/// Creates a [GlobalMaterialLocalizations] instance for the given `locale`.

examples/catalog/bin/sample_page.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -217,10 +217,10 @@ void generate(String commit) {
217217
<String, String>{
218218
'imports': samples.map<String>((SampleInfo page) {
219219
return "import '${page.importPath}' show ${page.sampleClass};\n";
220-
}).toList().join(),
220+
}).join(),
221221
'widgets': samples.map<String>((SampleInfo sample) {
222222
return 'new ${sample.sampleClass}(),\n';
223-
}).toList().join(),
223+
}).join(),
224224
},
225225
);
226226

@@ -232,7 +232,7 @@ void generate(String commit) {
232232
<String, String>{
233233
'paths': samples.map<String>((SampleInfo sample) {
234234
return "'${outputFile(sample.sourceName + '.png').path}'";
235-
}).toList().join(',\n'),
235+
}).join(',\n'),
236236
},
237237
);
238238

0 commit comments

Comments
 (0)