[flutter_tools] Enable custom devices on all channels (#109953)

This commit is contained in:
Zachary Anderson 2022-08-21 12:16:53 -07:00 committed by GitHub
parent 957a8da4a2
commit bd6b5cef95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 0 deletions

View File

@ -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.

View File

@ -384,5 +384,20 @@ void main() {
});
}
// 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);
});
}
});
}