diff --git a/packages/flutter_tools/lib/src/features.dart b/packages/flutter_tools/lib/src/features.dart index 95c0248e84..5e618b26fc 100644 --- a/packages/flutter_tools/lib/src/features.dart +++ b/packages/flutter_tools/lib/src/features.dart @@ -97,7 +97,7 @@ const Feature flutterWebFeature = Feature( const Feature flutterMacOSDesktopFeature = Feature( name: 'Flutter for desktop on macOS', configSetting: 'enable-macos-desktop', - environmentOverride: 'ENABLE_FLUTTER_DESKTOP', + environmentOverride: 'FLUTTER_MACOS', master: FeatureChannelSetting( available: true, enabledByDefault: false, @@ -108,7 +108,7 @@ const Feature flutterMacOSDesktopFeature = Feature( const Feature flutterLinuxDesktopFeature = Feature( name: 'Flutter for desktop on Linux', configSetting: 'enable-linux-desktop', - environmentOverride: 'ENABLE_FLUTTER_DESKTOP', + environmentOverride: 'FLUTTER_LINUX', master: FeatureChannelSetting( available: true, enabledByDefault: false, @@ -119,7 +119,7 @@ const Feature flutterLinuxDesktopFeature = Feature( const Feature flutterWindowsDesktopFeature = Feature( name: 'Flutter for desktop on Windows', configSetting: 'enable-windows-desktop', - environmentOverride: 'ENABLE_FLUTTER_DESKTOP', + environmentOverride: 'FLUTTER_WINDOWS', master: FeatureChannelSetting( available: true, enabledByDefault: false, diff --git a/packages/flutter_tools/test/general.shard/features_test.dart b/packages/flutter_tools/test/general.shard/features_test.dart index a7c978efd6..15757eb6a6 100644 --- a/packages/flutter_tools/test/general.shard/features_test.dart +++ b/packages/flutter_tools/test/general.shard/features_test.dart @@ -206,7 +206,7 @@ void main() { test('flutter macos desktop enabled with environment variable on master', () => testbed.run(() { when(mockFlutterVerion.channel).thenReturn('master'); - when(mockPlatform.environment).thenReturn({'ENABLE_FLUTTER_DESKTOP': 'true'}); + when(mockPlatform.environment).thenReturn({'FLUTTER_MACOS': 'true'}); expect(featureFlags.isMacOSEnabled, true); })); @@ -226,7 +226,7 @@ void main() { test('flutter macos desktop not enabled with environment variable on dev', () => testbed.run(() { when(mockFlutterVerion.channel).thenReturn('dev'); - when(mockPlatform.environment).thenReturn({'ENABLE_FLUTTER_DESKTOP': 'true'}); + when(mockPlatform.environment).thenReturn({'FLUTTER_MACOS': 'true'}); expect(featureFlags.isMacOSEnabled, false); })); @@ -246,7 +246,7 @@ void main() { test('flutter macos desktop not enabled with environment variable on beta', () => testbed.run(() { when(mockFlutterVerion.channel).thenReturn('beta'); - when(mockPlatform.environment).thenReturn({'ENABLE_FLUTTER_DESKTOP': 'true'}); + when(mockPlatform.environment).thenReturn({'FLUTTER_MACOS': 'true'}); expect(featureFlags.isMacOSEnabled, false); })); @@ -266,7 +266,7 @@ void main() { test('flutter macos desktop not enabled with environment variable on stable', () => testbed.run(() { when(mockFlutterVerion.channel).thenReturn('stable'); - when(mockPlatform.environment).thenReturn({'ENABLE_FLUTTER_DESKTOP': 'true'}); + when(mockPlatform.environment).thenReturn({'FLUTTER_MACOS': 'true'}); expect(featureFlags.isMacOSEnabled, false); })); @@ -287,7 +287,7 @@ void main() { test('flutter linux desktop enabled with environment variable on master', () => testbed.run(() { when(mockFlutterVerion.channel).thenReturn('master'); - when(mockPlatform.environment).thenReturn({'ENABLE_FLUTTER_DESKTOP': 'true'}); + when(mockPlatform.environment).thenReturn({'FLUTTER_LINUX': 'true'}); expect(featureFlags.isLinuxEnabled, true); })); @@ -307,7 +307,7 @@ void main() { test('flutter linux desktop not enabled with environment variable on dev', () => testbed.run(() { when(mockFlutterVerion.channel).thenReturn('dev'); - when(mockPlatform.environment).thenReturn({'ENABLE_FLUTTER_DESKTOP': 'true'}); + when(mockPlatform.environment).thenReturn({'FLUTTER_LINUX': 'true'}); expect(featureFlags.isLinuxEnabled, false); })); @@ -327,7 +327,7 @@ void main() { test('flutter linux desktop not enabled with environment variable on beta', () => testbed.run(() { when(mockFlutterVerion.channel).thenReturn('beta'); - when(mockPlatform.environment).thenReturn({'ENABLE_FLUTTER_DESKTOP': 'true'}); + when(mockPlatform.environment).thenReturn({'FLUTTER_LINUX': 'true'}); expect(featureFlags.isLinuxEnabled, false); })); @@ -347,7 +347,7 @@ void main() { test('flutter linux desktop not enabled with environment variable on stable', () => testbed.run(() { when(mockFlutterVerion.channel).thenReturn('stable'); - when(mockPlatform.environment).thenReturn({'ENABLE_FLUTTER_DESKTOP': 'true'}); + when(mockPlatform.environment).thenReturn({'FLUTTER_LINUX': 'true'}); expect(featureFlags.isLinuxEnabled, false); })); @@ -368,7 +368,7 @@ void main() { test('flutter windows desktop enabled with environment variable on master', () => testbed.run(() { when(mockFlutterVerion.channel).thenReturn('master'); - when(mockPlatform.environment).thenReturn({'ENABLE_FLUTTER_DESKTOP': 'true'}); + when(mockPlatform.environment).thenReturn({'FLUTTER_WINDOWS': 'true'}); expect(featureFlags.isWindowsEnabled, true); })); @@ -388,7 +388,7 @@ void main() { test('flutter windows desktop not enabled with environment variable on dev', () => testbed.run(() { when(mockFlutterVerion.channel).thenReturn('dev'); - when(mockPlatform.environment).thenReturn({'ENABLE_FLUTTER_DESKTOP': 'true'}); + when(mockPlatform.environment).thenReturn({'FLUTTER_WINDOWS': 'true'}); expect(featureFlags.isWindowsEnabled, false); })); @@ -408,7 +408,7 @@ void main() { test('flutter windows desktop not enabled with environment variable on beta', () => testbed.run(() { when(mockFlutterVerion.channel).thenReturn('beta'); - when(mockPlatform.environment).thenReturn({'ENABLE_FLUTTER_DESKTOP': 'true'}); + when(mockPlatform.environment).thenReturn({'FLUTTER_WINDOWS': 'true'}); expect(featureFlags.isWindowsEnabled, false); })); @@ -428,7 +428,7 @@ void main() { test('flutter windows desktop not enabled with environment variable on stable', () => testbed.run(() { when(mockFlutterVerion.channel).thenReturn('stable'); - when(mockPlatform.environment).thenReturn({'ENABLE_FLUTTER_DESKTOP': 'true'}); + when(mockPlatform.environment).thenReturn({'FLUTTER_WINDOWS': 'true'}); expect(featureFlags.isWindowsEnabled, false); }));