11<p align =" center " >
22 <a href =" https://pub.dev/packages/flutter_gen " >
3- <img src="https://github.com/FlutterGen/flutter_gen/raw/main/art/logo.png" width="480px"/>
3+ <img src="https://github.com/FlutterGen/flutter_gen/raw/main/art/logo.png" width="480px" alt="Logo" />
44 </a >
55</p >
66<p align =" center " >
77 <a href =" https://pub.dartlang.org/packages/flutter_gen " >
8- <img src="https://img.shields.io/pub/v/flutter_gen.svg">
8+ <img src="https://img.shields.io/pub/v/flutter_gen.svg" alt="Pub" >
99 </a >
1010 <a href =" https://github.com/FlutterGen/flutter_gen/actions?query=workflow%3A%22Dart+CI%22 " >
11- <img src="https://github.com/FlutterGen/flutter_gen/workflows/Dart%20CI /badge.svg" />
11+ <img src="https://github.com/FlutterGen/flutter_gen/workflows/Build /badge.svg" alt="Build Status" />
1212 </a >
1313 <a href =" https://codecov.io/gh/FlutterGen/flutter_gen " >
14- <img src="https://codecov.io/gh/FlutterGen/flutter_gen/branch/main/graph/badge.svg" />
15- </a >
16- <a href =" https://pub.dev/packages/lints " >
17- <img src="https://img.shields.io/badge/style-lints-40c4ff.svg" />
14+ <img src="https://codecov.io/gh/FlutterGen/flutter_gen/branch/main/graph/badge.svg" alt="Coverage"/>
1815 </a >
1916</p >
2017
@@ -147,7 +144,9 @@ flutter:
147144
148145### Assets
149146
150- Just follow the doc [Adding assets and images#Specifying assets](https://flutter.dev/docs/development/ui/assets-and-images#specifying-assets) to specify assets, then [FlutterGen] will generate related dart files.
147+ Following the doc
148+ [Adding assets and images#Specifying assets](https://flutter.dev/docs/development/ui/assets-and-images#specifying-assets)
149+ to specify assets, then [FlutterGen] will generate related dart files.
151150No other specific configuration is required.
152151_Ignore duplicated._
153152
@@ -168,6 +167,21 @@ flutter:
168167
169168These configurations will generate **` assets.gen.dart`** under the **`lib/gen/`** directory by default.
170169
170+ # ### Excluding generating for assets
171+
172+ You can specify `flutter_gen > assets > exclude` using `Glob` patterns to exclude particular assets.
173+
174+ ` ` ` yaml
175+ flutter_gen:
176+ assets:
177+ outputs:
178+ excludes:
179+ - folder-your-want-to-exclude/*
180+ - specified-asset.jpg
181+ ` ` `
182+
183+ See more patterns with the `package:glob`.
184+
171185# ### Generate for packages
172186
173187If you want to generate assets for a package,
@@ -323,15 +337,13 @@ Widget build(BuildContext context) {
323337
324338**Available Integrations**
325339
326- |Packages|File extension|Setting|Usage|
327- |--|--|--|--|
328- |[flutter_svg](https://pub.dev/packages/flutter_svg)|.svg| `flutter_svg : true` |Assets.images.icons.paint.**svg()**|
329- |[flare_flutter](https://pub.dev/packages/flare_flutter)|.flr| `flare_flutter : true` |Assets.flare.penguin.**flare()**|
330- |[rive](https://pub.dev/packages/rive)|.flr| `rive : true` |Assets.rive.vehicles.**rive()**|
331- |[lottie](https://pub.dev/packages/lottie)|.json| `lottie : true` |Assets.lottie.hamburgerArrow.**lottie()**|
332-
340+ | Packages | File extension | Setting | Usage |
341+ |---------------------------------------------------------|----------------|-----------------------|-------------------------------------------|
342+ | [flutter_svg](https://pub.dev/packages/flutter_svg) | .svg | `flutter_svg : true` | Assets.images.icons.paint.**svg()** |
343+ | [flare_flutter](https://pub.dev/packages/flare_flutter) | .flr | `flare_flutter : true` | Assets.flare.penguin.**flare()** |
344+ | [rive](https://pub.dev/packages/rive) | .flr | `rive : true` | Assets.rive.vehicles.**rive()** |
345+ | [lottie](https://pub.dev/packages/lottie) | .json | `lottie : true` | Assets.lottie.hamburgerArrow.**lottie()** |
333346
334- <br/>
335347
336348In other cases, the asset is generated as String class.
337349
@@ -409,6 +421,7 @@ Text(
409421 fontFamily: FontFamily.robotoMono,
410422 fontFamilyFallback: const [FontFamily.raleway],
411423 ),
424+ )
412425```
413426
414427[ Example of code generated by FlutterGen] ( https://github.com/FlutterGen/flutter_gen/tree/main/examples/example/lib/gen/fonts.gen.dart )
@@ -468,6 +481,7 @@ Please file [FlutterGen] specific issues, bugs, or feature requests in our [issu
468481Plugin issues that are not specific to [FlutterGen] can be filed in the [Flutter issue tracker](https://github.com/flutter/flutter/issues/new).
469482
470483# ## Known Issues
484+
471485# ### Bad State: No Element when using build_runner
472486If you get an error message like this :
473487` ` `
0 commit comments