mvu_layer library

Classes

Cmd<Model>
Class that implements some helpers when creating commands. Commands are a list of Sub
MappedMessenger<T extends Messenger<Model>, Model, ChildModel>
Helper messenger to create child-messengers. They operate on a subset of the original model, so you can do simpler messages that represent the transitions of a single widget.
Messenger<Model>
Class where the transitions are hold. Used with MsgBuilder do render the current state
MsgBuilder<T extends Messenger<Model>, Model>
Stateful widget that uses the messenger state to render the view and the messenger dispatcher to change it
MsgBuilderWithTickerProvider<T extends Messenger<Model>, Model>
Stateful widget that uses the messenger state to render the view and the messenger dispatcher to change it with an extra TickerProvider
MsgConnector<Connector extends Messenger<Model>, Model>
Use a Messenger from a MsgProvider up the widget tree
MsgProcessor<Model>
MsgProvider<Connector extends Messenger<Model>, Model>
Creates a way to pass a Messenger along the widget tree to be consumed by a child MsgConnector
MsgProviderTree
Creates a tree with all providers
Update<Model>
Defines the return of the new model with optional commands

Functions

fromModelMsg<Model>(Model fn(Model model), {bool doRebuild = true}) BehaviorMsg<Model>

Typedefs

BehaviorMsg<Model> = Update<Model> Function(Model)
Defines the behavior of the messages, taking a model and outputting a new model and optionally extra commands to send future messages
ChildCreator<ChildMessenger extends Messenger<ChildModel>, ChildModel, ChildMsg extends BehaviorMsg<ChildModel>, ParentMessenger extends Messenger<Model>, Model, Msg extends BehaviorMsg<Model>> = ChildMessenger Function(ParentMessenger)
Dispatch<Model> = void Function(BehaviorMsg<Model> )
Alias for a function that takes a message and returns void
Merger<Model, ChildModel> = Model Function(Model, ChildModel)
MessengerCreator<Model> = Messenger<Model> Function(MsgProcessor<Model>)
MessengerDisposer<Connector extends Messenger<Model>, Model> = void Function(Connector)
MessengerInitializer<Connector extends Messenger<Model>, Model> = void Function(Connector)
MsgWidgetBuilder<Model, MsgConnector> = Widget Function(BuildContext, MsgConnector, Model)
MsgWidgetBuilderWithTickerProvider<Model, MsgConnector> = Widget Function(BuildContext, MsgConnector, Model, TickerProvider)
Sub<Model> = void Function(Dispatch<Model> dispatch)
Alias for a function that takes a dispatcher and returns void
ToChild<Model, ChildModel> = ChildModel Function(Model)