Skip to content

Commit 0340f6f

Browse files
committed
📝 README
1 parent 757b9ec commit 0340f6f

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

‎README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,18 @@ flutter:
167167
168168
These configurations will generate **`assets.gen.dart`** under the **`lib/gen/`** directory by default.
169169

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+
170182
#### Excluding generating for assets
171183

172184
You can specify `flutter_gen > assets > exclude` using `Glob` patterns to exclude particular assets.

0 commit comments

Comments
 (0)