Implementing switch expressions in flutter_tools/ (#145632)

This pull request is step 12 in the journey to make this entire repository more readable.

(previous PRs: #139048, #139882, #141591, #142279, #142634, #142793, #143293, #143496, #143634, #143812, #144580)

We're getting close to the end! 😄
This commit is contained in:
Nate
2024-03-29 16:31:19 -06:00
committed by GitHub
parent 7f6685658c
commit a17d4b34f0
20 changed files with 222 additions and 409 deletions

View File

@@ -179,13 +179,10 @@ class VisualStudio {
/// version.
String? get cmakeGenerator {
// From https://cmake.org/cmake/help/v3.22/manual/cmake-generators.7.html#visual-studio-generators
switch (_majorVersion) {
case 17:
return 'Visual Studio 17 2022';
case 16:
default:
return 'Visual Studio 16 2019';
}
return switch (_majorVersion) {
17 => 'Visual Studio 17 2022',
_ => 'Visual Studio 16 2019',
};
}
/// The path to cl.exe, or null if no Visual Studio installation has