MVUProcessor<Model, Msg>.fromFunctions constructor

MVUProcessor<Model, Msg>.fromFunctions({
  1. required (Model, Cmd<Msg>) init(),
  2. required (Model, Cmd<Msg>) update(
    1. Msg,
    2. Model
    ),
  3. Subscription<Model, Msg>? subscriptions,
})

Create a new MVUProcessor from functions instead of subclassing.

Implementation

factory MVUProcessor.fromFunctions(
        {required (Model, Cmd<Msg>) Function() init,
        required (Model, Cmd<Msg>) Function(Msg, Model) update,
        Subscription<Model, Msg>? subscriptions}) =>
    _DelegatingMVUProcessor(init, update, subscriptions);