CarpenterWorkflowControllerBase<TState, TContext> constructor

CarpenterWorkflowControllerBase<TState, TContext>({
  1. required TState initialState,
  2. required TContext context,
  3. required List<CarpenterWorkflowTransition<TState, TContext>> transitions(
    1. TState state,
    2. TContext context
    ),
  4. required TState reduce(
    1. TState state,
    2. CarpenterWorkflowTransitionId transition
    ),
  5. Future<void> onCancel()?,
})

Implementation

CarpenterWorkflowControllerBase({
  required TState initialState,
  required this.context,
  required List<CarpenterWorkflowTransition<TState, TContext>> Function(
    TState state,
    TContext context,
  )
  transitions,
  required TState Function(
    TState state,
    CarpenterWorkflowTransitionId transition,
  )
  reduce,
  Future<void> Function()? onCancel,
}) : _state = initialState,
     _transitions = transitions,
     _reduce = reduce,
     _onCancel = onCancel;