onEnterWithData<D2> method
Describes how transitions to this state should be handled.
This method can be used when the entry handler requires access to state data of type D2 from
an ancestor state.
The build function is called with a TransitionHandlerBuilder that can be used to
describe the behavior of the exit transition.
Implementation
@override
void onEnterWithData<D2>(
void Function(TransitionHandlerBuilder<D, D2>) build,
) {
var builder =
TransitionHandlerBuilder<D, D2>._(key, _log, (transCtx) => transCtx.dataValueOrThrow<D2>());
build(builder);
_onEnter = builder._descriptor;
}