@@ -67,116 +67,43 @@ const List<Feature> allFeatures = <Feature>[
67
67
];
68
68
69
69
/// The [Feature] for flutter web.
70
- const Feature flutterWebFeature = Feature (
70
+ const Feature flutterWebFeature = Feature . fullyEnabled (
71
71
name: 'Flutter for web' ,
72
72
configSetting: 'enable-web' ,
73
73
environmentOverride: 'FLUTTER_WEB' ,
74
- master: FeatureChannelSetting (
75
- available: true ,
76
- enabledByDefault: true ,
77
- ),
78
- beta: FeatureChannelSetting (
79
- available: true ,
80
- enabledByDefault: true ,
81
- ),
82
- stable: FeatureChannelSetting (
83
- available: true ,
84
- enabledByDefault: true ,
85
- ),
86
74
);
87
75
88
76
/// The [Feature] for macOS desktop.
89
- const Feature flutterMacOSDesktopFeature = Feature (
77
+ const Feature flutterMacOSDesktopFeature = Feature . fullyEnabled (
90
78
name: 'support for desktop on macOS' ,
91
79
configSetting: 'enable-macos-desktop' ,
92
80
environmentOverride: 'FLUTTER_MACOS' ,
93
- master: FeatureChannelSetting (
94
- available: true ,
95
- enabledByDefault: true ,
96
- ),
97
- beta: FeatureChannelSetting (
98
- available: true ,
99
- enabledByDefault: true ,
100
- ),
101
- stable: FeatureChannelSetting (
102
- available: true ,
103
- enabledByDefault: true ,
104
- ),
105
81
);
106
82
107
83
/// The [Feature] for Linux desktop.
108
- const Feature flutterLinuxDesktopFeature = Feature (
84
+ const Feature flutterLinuxDesktopFeature = Feature . fullyEnabled (
109
85
name: 'support for desktop on Linux' ,
110
86
configSetting: 'enable-linux-desktop' ,
111
87
environmentOverride: 'FLUTTER_LINUX' ,
112
- master: FeatureChannelSetting (
113
- available: true ,
114
- enabledByDefault: true ,
115
- ),
116
- beta: FeatureChannelSetting (
117
- available: true ,
118
- enabledByDefault: true ,
119
- ),
120
- stable: FeatureChannelSetting (
121
- available: true ,
122
- enabledByDefault: true ,
123
- ),
124
88
);
125
89
126
90
/// The [Feature] for Windows desktop.
127
- const Feature flutterWindowsDesktopFeature = Feature (
91
+ const Feature flutterWindowsDesktopFeature = Feature . fullyEnabled (
128
92
name: 'support for desktop on Windows' ,
129
93
configSetting: 'enable-windows-desktop' ,
130
94
environmentOverride: 'FLUTTER_WINDOWS' ,
131
- master: FeatureChannelSetting (
132
- available: true ,
133
- enabledByDefault: true ,
134
- ),
135
- beta: FeatureChannelSetting (
136
- available: true ,
137
- enabledByDefault: true ,
138
- ),
139
- stable: FeatureChannelSetting (
140
- available: true ,
141
- enabledByDefault: true ,
142
- ),
143
95
);
144
96
145
97
/// The [Feature] for Android devices.
146
- const Feature flutterAndroidFeature = Feature (
98
+ const Feature flutterAndroidFeature = Feature . fullyEnabled (
147
99
name: 'Flutter for Android' ,
148
100
configSetting: 'enable-android' ,
149
- master: FeatureChannelSetting (
150
- available: true ,
151
- enabledByDefault: true ,
152
- ),
153
- beta: FeatureChannelSetting (
154
- available: true ,
155
- enabledByDefault: true ,
156
- ),
157
- stable: FeatureChannelSetting (
158
- available: true ,
159
- enabledByDefault: true ,
160
- ),
161
101
);
162
102
163
-
164
103
/// The [Feature] for iOS devices.
165
- const Feature flutterIOSFeature = Feature (
104
+ const Feature flutterIOSFeature = Feature . fullyEnabled (
166
105
name: 'Flutter for iOS' ,
167
106
configSetting: 'enable-ios' ,
168
- master: FeatureChannelSetting (
169
- available: true ,
170
- enabledByDefault: true ,
171
- ),
172
- beta: FeatureChannelSetting (
173
- available: true ,
174
- enabledByDefault: true ,
175
- ),
176
- stable: FeatureChannelSetting (
177
- available: true ,
178
- enabledByDefault: true ,
179
- ),
180
107
);
181
108
182
109
/// The [Feature] for Fuchsia support.
@@ -238,6 +165,25 @@ class Feature {
238
165
this .stable = const FeatureChannelSetting ()
239
166
});
240
167
168
+ /// Creates a [Feature] that is fully enabled across channels.
169
+ const Feature .fullyEnabled (
170
+ {required this .name,
171
+ this .environmentOverride,
172
+ this .configSetting,
173
+ this .extraHelpText})
174
+ : master = const FeatureChannelSetting (
175
+ available: true ,
176
+ enabledByDefault: true ,
177
+ ),
178
+ beta = const FeatureChannelSetting (
179
+ available: true ,
180
+ enabledByDefault: true ,
181
+ ),
182
+ stable = const FeatureChannelSetting (
183
+ available: true ,
184
+ enabledByDefault: true ,
185
+ );
186
+
241
187
/// The user visible name for this feature.
242
188
final String name;
243
189
0 commit comments