flutter/packages
Nate 5d1bfdcb87
Control flow collections: flutter_tools/ (#147450)
This pull request aims for improved readability, based on issue #146600.

```dart
// before
List<SupportedPlatform> getSupportedPlatforms({bool includeRoot = false}) {
  final List<SupportedPlatform> platforms = includeRoot
      ? <SupportedPlatform>[SupportedPlatform.root]
      : <SupportedPlatform>[];
  if (android.existsSync()) {
    platforms.add(SupportedPlatform.android);
  }
  if (ios.exists) {
    platforms.add(SupportedPlatform.ios);
  }
  if (web.existsSync()) {
    platforms.add(SupportedPlatform.web);
  }
  if (macos.existsSync()) {
    platforms.add(SupportedPlatform.macos);
  }
  if (linux.existsSync()) {
    platforms.add(SupportedPlatform.linux);
  }
  if (windows.existsSync()) {
    platforms.add(SupportedPlatform.windows);
  }
  if (fuchsia.existsSync()) {
    platforms.add(SupportedPlatform.fuchsia);
  }
  return platforms;
}

// after
List<SupportedPlatform> getSupportedPlatforms({bool includeRoot = false}) {
  return <SupportedPlatform>[
    if (includeRoot)          SupportedPlatform.root,
    if (android.existsSync()) SupportedPlatform.android,
    if (ios.exists)           SupportedPlatform.ios,
    if (web.existsSync())     SupportedPlatform.web,
    if (macos.existsSync())   SupportedPlatform.macos,
    if (linux.existsSync())   SupportedPlatform.linux,
    if (windows.existsSync()) SupportedPlatform.windows,
    if (fuchsia.existsSync()) SupportedPlatform.fuchsia,
  ];
}
```
2024-05-02 22:19:18 +00:00
..
flutter Add default arguments to AnimatedPhysicalModel (#147424) 2024-05-02 21:59:07 +00:00
flutter_driver Allow explicit exclusion of packages from pinned packages in flutter update-packages --force-update (#147679) 2024-05-02 01:16:54 +00:00
flutter_goldens Remove hidden dependencies on the default goldenFileComparator. (#146956) 2024-04-24 22:50:58 +00:00
flutter_localizations Bump meta to 1.14.0 (#146925) 2024-04-17 15:25:51 -07:00
flutter_test Allow the SceneBuilder, PictureRecord, and Canvas constructor calls from the rendering layer to be hooked (#147271) 2024-04-25 00:19:24 +00:00
flutter_tools Control flow collections: flutter_tools/ (#147450) 2024-05-02 22:19:18 +00:00
flutter_web_plugins Bump meta to 1.14.0 (#146925) 2024-04-17 15:25:51 -07:00
fuchsia_remote_debug_protocol Allow explicit exclusion of packages from pinned packages in flutter update-packages --force-update (#147679) 2024-05-02 01:16:54 +00:00
integration_test Allow explicit exclusion of packages from pinned packages in flutter update-packages --force-update (#147679) 2024-05-02 01:16:54 +00:00
analysis_options.yaml