factory 1.0.1 copy "factory: ^1.0.1" to clipboard
factory: ^1.0.1 copied to clipboard

outdated

factory generator package. Use it to generate factories implementations.

Factory Generator #

Factory is created to help define easy to use model factories with predefined field assignment behaviour.

Usage #

See README.md how to work with package.

Known Issues #

From time to time analyzer can't get default value code for formal field parameters. Often it happen for models with redirected constructor.

If factory not able to get default value code it assumes that parameter is required by default. Only drawback of this that you need provide explicit implementation for get{Param} method.

Workaround: #

Run build_runner clean ; build runner build --delete-conflicting-outputs to regenerate until factory code is valid;

Fix (8 September 2021): #

This behaviour fixed in analyzer: 2.0.0 but for now flutter not support it.

1
likes
0
pub points
28%
popularity

Publisher

unverified uploader

factory generator package. Use it to generate factories implementations.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

analyzer, build, build_config, code_builder, collection, dart_style, factory_annotation, source_gen

More

Packages that depend on factory