viumodel 1.1.7 copy "viumodel: ^1.1.7" to clipboard
viumodel: ^1.1.7 copied to clipboard

discontinuedreplaced by: tadpole
outdated

ViewModel with destroyable property

Library to easily manage ViewModels aka controller classes in Flutter that bounded to the lifecycle of the widget.

Features #

  • Three Viewmodel APIs in ViewModeMixin for State

    1. registerViewModel(create: ()=>ViewModel()) - instead of passing a viewmodel instance that is created from outside, we pass a function create to tell this API how to create a viewmodel.
    2. registerSharedViewModel(key: someStringConstant, createIfNull: ()=>ViewModel()) - this API shares viewmodel using the key which is a String constant. If the viewmodel associated with key is not already created anywhere in the application, a new viewmodel is created using the function createIfNull and stored
    3. getViewModel
  • For Widgets, that only need the access to the viewmodel registered in the parent, we have ViewModelProviderMixin for Widget

Additional information #

This library is maintained by Developers at Donut.

2
likes
0
points
16
downloads

Publisher

verified publisherayushsuman.com

Weekly Downloads

ViewModel with destroyable property

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on viumodel