MVUBuilder<Model, Msg>.ofProcessor constructor

MVUBuilder<Model, Msg>.ofProcessor({
  1. required MVUProcessor<Model, Msg> processor,
  2. required MsgWidgetBuilder<Model, Msg> view,
  3. void onDispose()?,
})

Creates a MVUBuilder with the given processor and view functions. Optional onDispose will run when the widget is removed from the widget tree.

Implementation

MVUBuilder.ofProcessor(
    {required MVUProcessor<Model, Msg> processor,
    required MsgWidgetBuilder<Model, Msg> view,
    void Function()? onDispose})
    : this._(
          processor,
          ((BuildContext context, TickerProvider _, Model model,
                  Dispatch<Msg> dispatcher) =>
              view(context, model, dispatcher)),
          onDispose: onDispose);