File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
packages/flutter_tools/lib/src/commands Expand file tree Collapse file tree 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 {
413413 final List <String > result = < String > [];
414414 try {
415415 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)) {
417418 result.add ('linux' );
418419 }
419- if (featureFlags.isMacOSEnabled && flutterProject.macos. existsSync ( )) {
420+ if (featureFlags.isMacOSEnabled && supportedPlatforms. contains ( SupportedPlatform .macos )) {
420421 result.add ('macos' );
421422 }
422- if (featureFlags.isWindowsEnabled && flutterProject.windows. existsSync ( )) {
423+ if (featureFlags.isWindowsEnabled && supportedPlatforms. contains ( SupportedPlatform .windows )) {
423424 result.add ('windows' );
424425 }
425- if (featureFlags.isIOSEnabled && flutterProject.ios. existsSync ( )) {
426+ if (featureFlags.isIOSEnabled && supportedPlatforms. contains ( SupportedPlatform .ios )) {
426427 result.add ('ios' );
427428 }
428- if (featureFlags.isAndroidEnabled && flutterProject.android. existsSync ( )) {
429+ if (featureFlags.isAndroidEnabled && supportedPlatforms. contains ( SupportedPlatform .android )) {
429430 result.add ('android' );
430431 }
431- if (featureFlags.isWebEnabled && flutterProject.web. existsSync ( )) {
432+ if (featureFlags.isWebEnabled && supportedPlatforms. contains ( SupportedPlatform .web )) {
432433 result.add ('web' );
433434 }
434- if (featureFlags.isFuchsiaEnabled && flutterProject.fuchsia. existsSync ( )) {
435+ if (featureFlags.isFuchsiaEnabled && supportedPlatforms. contains ( SupportedPlatform .fuchsia )) {
435436 result.add ('fuchsia' );
436437 }
437438 if (featureFlags.areCustomDevicesEnabled) {
You can’t perform that action at this time.
0 commit comments