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,
  4. bool modelEquality(
    1. Model,
    2. Model
    )?,
})

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,
        bool Function(Model, Model)? modelEquality}) =>
    _DelegatingMVUProcessor(init, update, subscriptions, modelEquality);