switch statement cleanup (#148382)

This PR is step 12 in the journey to solve issue #136139 and make the
entire Flutter repo more readable.

Most of it involves implementing switch expressions, and there's also a
few other random things that I wanted to clean up a bit.
This commit is contained in:
Nate
2024-05-16 18:16:06 -06:00
committed by GitHub
parent c4ad1dc1e9
commit fa9992eff6
39 changed files with 301 additions and 529 deletions

View File

@@ -76,9 +76,7 @@ enum FlutterProjectType implements CliEnum {
static List<FlutterProjectType> get enabledValues {
return <FlutterProjectType>[
for (final FlutterProjectType value in values)
if (value == FlutterProjectType.packageFfi) ...<FlutterProjectType>[
if (featureFlags.isNativeAssetsEnabled) value
] else
if (value != FlutterProjectType.packageFfi || featureFlags.isNativeAssetsEnabled)
value,
];
}