MVUBuilder<Model, Msg>.withTickerProvider constructor
MVUBuilder<Model, Msg>.withTickerProvider ({
- required (Model, Cmd<
Msg> ) init(), - required (Model, Cmd<
Msg> ) update(- Msg,
- Model
- required MsgWidgetBuilderWithTickerProvider<
Model, Msg> view, - Subscription<
Model, Msg> ? subscriptions, - bool modelEquality(
- Model,
- Model
- void onDispose(
- MVUProcessor<
Model, Msg> processor
- MVUProcessor<
- bool disposesProcessor = true,
Creates a MVUBuilder with the given init, update and view 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.viewis called to render the view and dispatch new messages.tickerProvideris used to create a Ticker for animations.
Implementation
MVUBuilder.withTickerProvider(
{required (Model, Cmd<Msg>) Function() init,
required (Model, Cmd<Msg>) Function(Msg, Model) update,
required MsgWidgetBuilderWithTickerProvider<Model, Msg> view,
Subscription<Model, Msg>? subscriptions,
bool Function(Model, Model)? modelEquality,
void Function(MVUProcessor<Model, Msg> processor)? onDispose,
bool disposesProcessor = true})
: this._(
MVUProcessor.fromFunctions(
init: init,
update: update,
subscriptions: subscriptions,
modelEquality: modelEquality),
view,
onDispose: onDispose,
disposesProcessor: disposesProcessor);