Unverified Commit 14b3f740 authored by Kevin Moore's avatar Kevin Moore Committed by GitHub

flutter_tool: DRY up features that are fully enabled (#121754)

flutter_tool: DRY up features that are fully enabled
parent b85f195d
......@@ -67,116 +67,43 @@ const List<Feature> allFeatures = <Feature>[
];
/// The [Feature] for flutter web.
const Feature flutterWebFeature = Feature(
const Feature flutterWebFeature = Feature.fullyEnabled(
name: 'Flutter for web',
configSetting: 'enable-web',
environmentOverride: 'FLUTTER_WEB',
master: FeatureChannelSetting(
available: true,
enabledByDefault: true,
),
beta: FeatureChannelSetting(
available: true,
enabledByDefault: true,
),
stable: FeatureChannelSetting(
available: true,
enabledByDefault: true,
),
);
/// The [Feature] for macOS desktop.
const Feature flutterMacOSDesktopFeature = Feature(
const Feature flutterMacOSDesktopFeature = Feature.fullyEnabled(
name: 'support for desktop on macOS',
configSetting: 'enable-macos-desktop',
environmentOverride: 'FLUTTER_MACOS',
master: FeatureChannelSetting(
available: true,
enabledByDefault: true,
),
beta: FeatureChannelSetting(
available: true,
enabledByDefault: true,
),
stable: FeatureChannelSetting(
available: true,
enabledByDefault: true,
),
);
/// The [Feature] for Linux desktop.
const Feature flutterLinuxDesktopFeature = Feature(
const Feature flutterLinuxDesktopFeature = Feature.fullyEnabled(
name: 'support for desktop on Linux',
configSetting: 'enable-linux-desktop',
environmentOverride: 'FLUTTER_LINUX',
master: FeatureChannelSetting(
available: true,
enabledByDefault: true,
),
beta: FeatureChannelSetting(
available: true,
enabledByDefault: true,
),
stable: FeatureChannelSetting(
available: true,
enabledByDefault: true,
),
);
/// The [Feature] for Windows desktop.
const Feature flutterWindowsDesktopFeature = Feature(
const Feature flutterWindowsDesktopFeature = Feature.fullyEnabled(
name: 'support for desktop on Windows',
configSetting: 'enable-windows-desktop',
environmentOverride: 'FLUTTER_WINDOWS',
master: FeatureChannelSetting(
available: true,
enabledByDefault: true,
),
beta: FeatureChannelSetting(
available: true,
enabledByDefault: true,
),
stable: FeatureChannelSetting(
available: true,
enabledByDefault: true,
),
);
/// The [Feature] for Android devices.
const Feature flutterAndroidFeature = Feature(
const Feature flutterAndroidFeature = Feature.fullyEnabled(
name: 'Flutter for Android',
configSetting: 'enable-android',
master: FeatureChannelSetting(
available: true,
enabledByDefault: true,
),
beta: FeatureChannelSetting(
available: true,
enabledByDefault: true,
),
stable: FeatureChannelSetting(
available: true,
enabledByDefault: true,
),
);
/// The [Feature] for iOS devices.
const Feature flutterIOSFeature = Feature(
const Feature flutterIOSFeature = Feature.fullyEnabled(
name: 'Flutter for iOS',
configSetting: 'enable-ios',
master: FeatureChannelSetting(
available: true,
enabledByDefault: true,
),
beta: FeatureChannelSetting(
available: true,
enabledByDefault: true,
),
stable: FeatureChannelSetting(
available: true,
enabledByDefault: true,
),
);
/// The [Feature] for Fuchsia support.
......@@ -238,6 +165,25 @@ class Feature {
this.stable = const FeatureChannelSetting()
});
/// Creates a [Feature] that is fully enabled across channels.
const Feature.fullyEnabled(
{required this.name,
this.environmentOverride,
this.configSetting,
this.extraHelpText})
: master = const FeatureChannelSetting(
available: true,
enabledByDefault: true,
),
beta = const FeatureChannelSetting(
available: true,
enabledByDefault: true,
),
stable = const FeatureChannelSetting(
available: true,
enabledByDefault: true,
);
/// The user visible name for this feature.
final String name;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment