immutable_model 0.9.4 copy "immutable_model: ^0.9.4" to clipboard
immutable_model: ^0.9.4 copied to clipboard

Define valid, hierarchical immutable state models with an expressive API for updating state data and transitioning between states.

example/README.md

Examples #

Examples using immutable_model with different state management systems. The projects have the same UI and demonstrate modeling different kinds of states and the associated data.

The UI includes:

  • The SignIn form shows how to do 'live' user input validation as well as parameterising the authentication logic using the provided ModelEmail and ModelPassword classes as validated value types.
  • The User Choices form shows one can update any value in the model (even nested values) using just the update() function. Also shows how these updates can only take place if the user is authenticated.
  • The Weather Getter shows how the use of an API would work, where severalized data is inputted to the data layer and only valid models are passed back into the domain layer. It also shows the use of 'Strict Updates' where each field in the sub-model must have a value and that value must be valid.

Examples include:

  • With BLoC: An example project using the well-known standard BLoC state management framework
  • With BLoC Cubits: An example project using Cubits from the BLoC state management framework
  • With BLoC Cubits: An example project using Cubits from the BLoC state management framework
2
likes
40
pub points
0%
popularity

Publisher

unverified uploader

Define valid, hierarchical immutable state models with an expressive API for updating state data and transitioning between states.

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

built_collection, collection, crypto, equatable, logging, meta

More

Packages that depend on immutable_model