flutter_gen
flutter_gen copied to clipboard
Allow exclusion of paths and files using globs
What does this change?
This pull request will add the ability to exclude directories and files, that are listed in the flutter assets section, from the code generation with flutter gen. This is needed for bigger projects, that include a massive amount of asset files that are only addressed with constructing the code paths programmatically and should not be visible as resources in the generated assets file.
This PR is a rework of this PR https://github.com/FlutterGen/flutter_gen/pull/197, which can be closed in favor of this PR. It supports the definitions of excluded paths using GLOB patterns. It short circuits the execution if paths have been defined in the exclude section of the flutter_gen config.
Thank you for this PR I’ll check a few days.
@kaptnkoala
Thank you. I'm thinking about change the exclude property position to asset.
assets:
enabled: true
package_parameter_enabled: false
exclude:
- assets/images/chip3/*.jpg
- pictures/chip5.jpg