From bd6b5cef9515a0d4b8bb34fa8c546a4ed3bcbf8c Mon Sep 17 00:00:00 2001 From: Zachary Anderson Date: Sun, 21 Aug 2022 12:16:53 -0700 Subject: [PATCH] [flutter_tools] Enable custom devices on all channels (#109953) --- packages/flutter_tools/lib/src/features.dart | 6 ++++++ .../test/general.shard/features_test.dart | 15 +++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/packages/flutter_tools/lib/src/features.dart b/packages/flutter_tools/lib/src/features.dart index 74a3116b4d..1562375c78 100644 --- a/packages/flutter_tools/lib/src/features.dart +++ b/packages/flutter_tools/lib/src/features.dart @@ -196,6 +196,12 @@ const Feature flutterCustomDevicesFeature = Feature( master: FeatureChannelSetting( available: true, ), + beta: FeatureChannelSetting( + available: true, + ), + stable: FeatureChannelSetting( + available: true, + ), ); /// The fast hot reload feature for https://github.com/flutter/flutter/issues/61407. diff --git a/packages/flutter_tools/test/general.shard/features_test.dart b/packages/flutter_tools/test/general.shard/features_test.dart index c8e2036559..569ff1699d 100644 --- a/packages/flutter_tools/test/general.shard/features_test.dart +++ b/packages/flutter_tools/test/general.shard/features_test.dart @@ -384,5 +384,20 @@ void main() { }); } + // Custom devices on all channels + for (final String channel in ['master', 'beta', 'stable']) { + testWithoutContext('Custom devices are enabled with flag on $channel', () { + final FeatureFlags featureFlags = createFlags(channel); + testConfig.setValue('enable-custom-devices', true); + expect(featureFlags.areCustomDevicesEnabled, true); + }); + + testWithoutContext('Custom devices are enabled with environment variable on $channel', () { + final FeatureFlags featureFlags = createFlags(channel); + platform.environment = {'FLUTTER_CUSTOM_DEVICES': 'true'}; + expect(featureFlags.areCustomDevicesEnabled, true); + }); + } + }); }