MVUProvider<Model, Msg> constructor
MVUProvider<Model, Msg> ({})
Creates a MVUProvider with the given init, update functions.
initis called once to return the initial model and commands.updateis called when a message is received to update the model and return new commands.subscriptionsis called to return subscriptions to be executed if enabled by the model.modelEqualityis used to compare the model and avoid unnecessary rebuilds.childis the widget to be rendered.onInitis called when the widget is initialized.onDisposeis called when the widget is disposed.
Implementation
MVUProvider(
{required (Model, Cmd<Msg>) Function() init,
required (Model, Cmd<Msg>) Function(Msg, Model) update,
Subscription<Model, Msg>? subscriptions,
bool Function(Model, Model)? modelEquality,
this.child = const SizedBox.shrink(),
this.onInit,
this.onDispose,
super.key})
: processor = MVUProcessor.fromFunctions(
init: init,
update: update,
subscriptions: subscriptions,
modelEquality: modelEquality);