useModel<T> method

Future<T> useModel<T>(
  1. T handler(
    1. Model model,
    2. Dispatch<Msg> dispatch
    )
)

Use the model, after all current messages are processed, and dispatch function. Can be used to return values and dispatch new messages depending on the current model.

Implementation

Future<T> useModel<T>(
        T Function(Model model, Dispatch<Msg> dispatch) handler) =>
    _processor._useModel(handler);