useModel<T> method

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

Use the current model and dispatch function. Can be used to return values and dispatch new messages depending on the current model.

Implementation

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