subscribe method

StreamSubscription<Model> subscribe(
  1. void handler(
    1. Model model,
    2. Dispatch<Msg> dispatch
    )
)

Subscribe to changes in the model. This can be used to update the UI.

Implementation

StreamSubscription<Model> subscribe(
        void Function(Model model, Dispatch<Msg> dispatch) handler) =>
    _processor.changes.stream
        .listen((model) => handler(model, _processor.post));