mvu library

Classes

Cmd<Msg>
MVUBuilder<Model, Msg>
Stateful widget that uses MVU to render the view and the dispatcher for sending messages to change it.
MVUContext<Model, Msg>
Widget that builds the view from the model and dispatches messages, getting the MVUProcessor from the context.
MVUProcessor<Model, Msg>
Detached MVU processor that can be used to dispatch messages from anywhere. It can be created from functions or subclassed. This is useful when you want to dispatch messages from outside the view. The processor can also be used with dependency injection to create a singleton.
MVUProvider<Model, Msg>
Adds the required MVUProcessor to the widget tree to be later used in MVUContext.
MVUProviderTree
Creates a tree with all providers
MVUProviderWidget<Model, Msg>
Widget that provides the MVUProcessor to the widget tree for subclassing.
MVUWidget<Model, Msg>
This widget exposes the MVU as base class for scenarios where the MVUBuilder is not suitable. For example, when the widget has local dependencies that are not part of the model. In this case, the widget can extend this class and implement the abstract methods.
MVUWidgetWithTicker<Model, Msg>
Same as MVUWidget but with a TickerProvider for animations.
Sub<Msg>

Extensions

MappedDispatch on Dispatch<Msg>
MappedUpdate on (InnerModel, Cmd<InnerMsg>)

Typedefs

Dispatch<Msg> = void Function(Msg msg)
Effect<Msg> = FutureOr<void> Function(Dispatch<Msg> dispatch)
MsgWidgetBuilder<Model, Msg> = Widget Function(BuildContext, Model, Dispatch<Msg> )
MsgWidgetBuilderWithTickerProvider<Model, Msg> = Widget Function(BuildContext, TickerProvider, Model, Dispatch<Msg> )
SubItem<Msg> = (SubscriptionId, Subscribe<Msg>)
Subs<Msg> = List<SubItem<Msg>>
Subscribe<Msg> = void Function() Function(Dispatch<Msg> dispatch)
Subscription<Model, Msg> = Subs<Msg> Function(Model model)
SubscriptionId = List<String>