File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -167,6 +167,18 @@ flutter:
167
167
168
168
These configurations will generate **` assets.gen.dart`** under the **`lib/gen/`** directory by default.
169
169
170
+ # ### Flavored assets
171
+
172
+ Flutter supports
173
+ [Conditionally bundling assets based on flavor](https://docs.flutter.dev/deployment/flavors#conditionally-bundling-assets-based-on-flavor).
174
+ Assets are only available with flavors if specified.
175
+ ` flutter_gen` will generate the specified `flavors` for assets regardless the current flavor.
176
+ The `flavors` field accessible though `.flavors`, for example :
177
+
178
+ ` ` ` dart
179
+ print(MyAssets.images.chip4.flavors); // -> {'extern'}
180
+ ` ` `
181
+
170
182
# ### Excluding generating for assets
171
183
172
184
You can specify `flutter_gen > assets > exclude` using `Glob` patterns to exclude particular assets.
You can’t perform that action at this time.
0 commit comments