MachineDoneHandlerBuilder<C> class

Provides methods for describing how a StateTreeBuilder.machineState behaves when its nested state machine completes.

Because nothing meaningful can be done with the completed state machine , the StateTreeBuilder.machineState must transition to a new state on completion. Therefore the methods of this builder can only be used to specifiy a transition.

Properties

act MessageActionBuilder<Object, NestedMachineData, C>
A MessageActionBuilder that can be used to specify actions that should take place when handling messages.
latefinalinherited
descriptor ↔ MessageHandlerDescriptor<C>?
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

enterChannel<P>(Channel<P> channel, FutureOr<P> payload(MessageHandlerContext<Object, NestedMachineData, C>), {MessageActionDescriptor<Object, NestedMachineData, C>? action, bool reenterTarget = false}) → void
Indicates that channel should be entered and a transition to the channels state should occur.
inherited
goTo(StateKey targetState, {TransitionHandler? transitionAction, FutureOr<Object?> payload(MessageHandlerContext<Object, NestedMachineData, C> ctx)?, MessageActionDescriptor<Object, NestedMachineData, C>? action, bool reenterTarget = false, String? label}) → void
Indicates that a transition to targetState should occur.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
when(FutureOr<bool> condition(MessageHandlerContext<Object, NestedMachineData, C>), void buildTrueHandler(MachineDoneHandlerBuilder<C> builder), {String? label}) MachineDoneWhenBuilder<C>
Adds a conditional behavior, in the same manner as MessageHandlerBuilder.when.
whenResult<T>(FutureOr<Result<T>> result(MessageHandlerContext<Object, NestedMachineData, C>), void buildSuccessHandler(MachineDoneHandlerBuilder<T> builder), {String? label}) MachineDoneWhenResultBuilder<C, T>

Operators

operator ==(Object other) bool
The equality operator.
inherited