MappedMessenger<T extends Messenger<Model> , Model, ChildModel> class
abstract
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.
- Implemented types
-
- Messenger<
ChildModel>
- Messenger<
Constructors
-
MappedMessenger(T original, ToChild<
Model, ChildModel> mapToChild, Merger<Model, ChildModel> merge)
Properties
-
changes
→ Stream<
ChildModel> -
no setteroverride
-
dispatcher
→ Dispatch<
ChildModel> -
Dispatch a message created using a function
no setteroverride
- firstModel → ChildModel
-
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
-
model
→ Future<
ChildModel> -
Recover the latest model in a async getter
no setteroverride
- original → T
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addDependent(
Messenger dependent) → void -
override
-
commandDispatcher(
Cmd< ChildModel> commands) → void -
Dispatch a command, reusing the same model
override
-
dispose(
) → void -
override
-
doWithModel(
FutureOr< void> action(ChildModel model), {Update<ChildModel> onSuccessUpdate(ChildModel model)?, ChildModel onSuccessModel(ChildModel model)?, Cmd<ChildModel> ? onSuccessCommands, Update<ChildModel> onErrorUpdate(ChildModel model, Exception e)?, ChildModel onErrorModel(ChildModel model, Exception e)?, Cmd<ChildModel> onErrorCommands(Exception e)?, bool doRebuild = true}) → void -
Uses the latest model to do some computation
override
-
extract<
T> (T extractFunction(ChildModel)) → Future< T> -
Extract a future value mapped from the model
override
-
modelDispatcher(
ChildModel msg(ChildModel model), {bool doRebuild = true}) → void -
Dispatch a message that just returns the new model from the old model
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
reset(
) → void -
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited