dispatchModel<Model extends BaseUIModel> abstract method

Future<void> dispatchModel<Model extends BaseUIModel>(
  1. Model defaultModel,
  2. void f(
    1. Model m
    ), [
  3. bool overwrite = false
])

Sends an anonymous action given the data of a model of type BaseUIModel

The key used for the model must be guaranteed as unique by the developer across the whole app. Setting overwrite to true forces dispatchModel not to reuse any portion of the Model in the Store.

Implementation

Future<void> dispatchModel<Model extends BaseUIModel>(
    Model defaultModel, void Function(Model m) f,
    [bool overwrite = false]);