InitialData<D> class
Describes the initial value for a StateTreeBuilder.dataState that carries a value of type D.
Constructors
- InitialData(D create())
-
Creates an InitialData that will call the
createfunction to obtain the initial data value. The function is called each time the data state is entered.factory - InitialData.run(D create(TransitionContext))
-
Creates an InitialData that will call the
createfunction, passing the TransitionContext for the transition in progress, to obtain the initial data value. The function is called each time the data state is entered.factory
Properties
Methods
-
call(
TransitionContext transCtx) → D - Creates the initial data value.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
fromAncestor<
D, DAncestor> (D initialValue(DAncestor ancData)) → InitialData< D> -
Creates an InitialData that produces its initial value by calling
initialValuewith a value of typeDAncestor, obtained by from an ancestor state in the state tree. -
fromChannel<
D, P> (Channel< P> channel, D initialValue(P payload)) → InitialData<D> -
Creates an InitialData that produces its value by calling
initialValuewith the payload provided when entering the state throughchannel. -
fromChannelAndAncestor<
D, DAncestor, P> (Channel< P> channel, D initialValue(DAncestor parentData, P payload)) → InitialData<D> -
Creates an InitialData that produces its initial value by calling
initialValuewith a value of typeDAncestor, obtained by from an ancestor state in the state tree, and the payload value ofchannel.