Setup
Installation
Add these dev dependencies :
Then, add ONE of these dependencies :
This package uses the functional programming types Option
, Either
and Tuple2
.
If you use fpdart as a functional programming package, install
modddels_annotation_fpdart
.If you use dartz as a functional programming package, install
modddels_annotation_dartz
.
If you're not familiar with functional programming, I recommend using fpdart, which is well documented and contains all the resources you need to learn the core concepts. You only need to know about Option
and Either
to use this package.
Running the Generator
In your package directory, run the following command :
For flutter projects, you can instead run :
See build_runner for more commands.
Last updated