Setup

Installation

Add these dev dependencies :

dev_dependencies:
  build_runner:
  modddels:

Then, add ONE of these dependencies :

dependencies:
  # If you use fpdart for functional programming
  modddels_annotation_fpdart:
  # If you use dartz for functional programming
  modddels_annotation_dartz:

This package uses the functional programming types Option, Either and Tuple2.

  • If you use fpdartarrow-up-right as a functional programming package, install modddels_annotation_fpdart.

  • If you use dartzarrow-up-right as a functional programming package, install modddels_annotation_dartz.

circle-info

If you're not familiar with functional programming, I recommend using fpdartarrow-up-right, 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_runnerarrow-up-right for more commands.

Last updated