currentActions property

List<WorkflowAction> get currentActions

Implementation

List<WorkflowAction> get currentActions {
  final actions = <WorkflowAction>[];
  final steps = evaluateCurrentSteps();
  final pages = evaluateCurrentPages();

  if (_currentPageIndex > 0 || _currentStepIndex > 0) {
    actions.add(WorkflowAction(label: "Previous", onTap: navigatePrevious));
  }

  if (_currentStepIndex < steps.length - 1 ||
      _currentPageIndex < pages.length - 1) {
    actions.add(WorkflowAction(label: "Next", onTap: navigateNext));
  }

  actions.add(
    WorkflowAction(label: "Cancel", onTap: workflow.onCancelled ?? () {}),
  );

  return actions;
}