[flutter_tools] Enable custom devices on all channels (#109953) (#109959)
diff --git a/packages/flutter_tools/lib/src/features.dart b/packages/flutter_tools/lib/src/features.dart
index 74a3116..1562375 100644
--- a/packages/flutter_tools/lib/src/features.dart
+++ b/packages/flutter_tools/lib/src/features.dart
@@ -196,6 +196,12 @@
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 c8e2036..569ff16 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 @@
});
}
+ // Custom devices on all channels
+ for (final String channel in <String>['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 = <String, String>{'FLUTTER_CUSTOM_DEVICES': 'true'};
+ expect(featureFlags.areCustomDevicesEnabled, true);
+ });
+ }
+
});
}