enable lint avoid_function_literals_in_foreach_calls (#12607)

This commit is contained in:
Alexandre Ardhuin
2017-10-19 08:16:16 +02:00
committed by GitHub
parent 79fbf8bb03
commit 700dc9f752
12 changed files with 52 additions and 51 deletions

View File

@@ -120,12 +120,12 @@ Future<Null> saveCatalogScreenshots({
String prefix, // Prefix for all file names.
}) async {
final List<String> screenshots = <String>[];
directory.listSync().forEach((FileSystemEntity entity) {
for (FileSystemEntity entity in directory.listSync()) {
if (entity is File && entity.path.endsWith('.png')) {
final File file = entity;
screenshots.add(file.path);
}
});
}
final List<String> largeNames = <String>[]; // Cloud storage names for the full res screenshots.
final List<String> smallNames = <String>[]; // Likewise for the scaled down screenshots.