Messenger<Model> class
abstract
Class where the transitions are hold. Used with MsgBuilder do render the current state
- Implementers
Constructors
-
Messenger(Update<
Model> init) - Initial state of the Messenger
- Messenger.model(Model init)
- Named initializer for simple model initialization
Properties
-
changes
→ Stream<
Model> -
no setter
-
dispatcher
→ Dispatch<
Model> -
Dispatch a message created using a function
no setter
- firstModel → Model
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
-
model
→ Future<
Model> -
Recover the latest model in a async getter
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addDependent(
Messenger dependent) → void -
commandDispatcher(
Cmd< Model> commands) → void - Dispatch a command, reusing the same model
-
dispose(
) → void -
doWithModel(
FutureOr< void> action(Model model), {Update<Model> onSuccessUpdate(Model model)?, Model onSuccessModel(Model model)?, Cmd<Model> ? onSuccessCommands, Update<Model> onErrorUpdate(Model model, Exception e)?, Model onErrorModel(Model model, Exception e)?, Cmd<Model> onErrorCommands(Exception e)?, bool doRebuild = true}) → void - Uses the latest model to do some computation
-
extract<
T> (T extractFunction(Model)) → Future< T> - Extract a future value mapped from the model
-
modelDispatcher(
Model msg(Model model), {bool doRebuild = true}) → void - Dispatch a message that just returns the new model from the old model
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
reset(
) → void -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited