Dart build.yaml docs proposes this approach to build with custom configurations:
If you need other configurations in addition to dev and release, you can define multiple
build.yaml
files. For instance if you have abuild.debug.yaml
file you can build with--config debug
and this file will be used instead of the defaultbuild.yaml
. The dev and release flavors still apply.dart run build_runner serve --config debug
will use the dev_options inbuild.debug.yaml
, whiledart run build_runner build --config debug --release
will use therelease_options
inbuild.debug.yaml
.
With this approach is there any way I can use default configs from build.yaml
and only override some configs or add new configs in build.debug.yaml
. Is this supported in any way?