Commit 19d5113 1 parent 77ad519 commit 19d5113 Copy full SHA for 19d5113
File tree 1 file changed +8
-7
lines changed
packages/flutter_tools/lib/src/commands
1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -413,25 +413,26 @@ class DaemonDomain extends Domain {
413
413
final List <String > result = < String > [];
414
414
try {
415
415
final FlutterProject flutterProject = FlutterProject .fromDirectory (globals.fs.directory (projectRoot));
416
- if (featureFlags.isLinuxEnabled && flutterProject.linux.existsSync ()) {
416
+ final Set <SupportedPlatform > supportedPlatforms = flutterProject.getSupportedPlatforms ().toSet ();
417
+ if (featureFlags.isLinuxEnabled && supportedPlatforms.contains (SupportedPlatform .linux)) {
417
418
result.add ('linux' );
418
419
}
419
- if (featureFlags.isMacOSEnabled && flutterProject.macos. existsSync ( )) {
420
+ if (featureFlags.isMacOSEnabled && supportedPlatforms. contains ( SupportedPlatform .macos )) {
420
421
result.add ('macos' );
421
422
}
422
- if (featureFlags.isWindowsEnabled && flutterProject.windows. existsSync ( )) {
423
+ if (featureFlags.isWindowsEnabled && supportedPlatforms. contains ( SupportedPlatform .windows )) {
423
424
result.add ('windows' );
424
425
}
425
- if (featureFlags.isIOSEnabled && flutterProject.ios. existsSync ( )) {
426
+ if (featureFlags.isIOSEnabled && supportedPlatforms. contains ( SupportedPlatform .ios )) {
426
427
result.add ('ios' );
427
428
}
428
- if (featureFlags.isAndroidEnabled && flutterProject.android. existsSync ( )) {
429
+ if (featureFlags.isAndroidEnabled && supportedPlatforms. contains ( SupportedPlatform .android )) {
429
430
result.add ('android' );
430
431
}
431
- if (featureFlags.isWebEnabled && flutterProject.web. existsSync ( )) {
432
+ if (featureFlags.isWebEnabled && supportedPlatforms. contains ( SupportedPlatform .web )) {
432
433
result.add ('web' );
433
434
}
434
- if (featureFlags.isFuchsiaEnabled && flutterProject.fuchsia. existsSync ( )) {
435
+ if (featureFlags.isFuchsiaEnabled && supportedPlatforms. contains ( SupportedPlatform .fuchsia )) {
435
436
result.add ('fuchsia' );
436
437
}
437
438
if (featureFlags.areCustomDevicesEnabled) {
You can’t perform that action at this time.
0 commit comments