startWorkflow method

void startWorkflow(
  1. BuildContext context,
  2. int workFlowId
)

Implementation

void startWorkflow(BuildContext context, int workFlowId) {
  _currentWorkflow = _workflows.firstWhere(
        (workflow) => workflow.id == workFlowId,
    orElse: () => throw Exception("Invalid typeId"),
  );
  _currentScreenId = _currentWorkflow!.screenSequence.first;

  // Navigate to the first screen in the sequence
  _navigateToNewScreen(context);
}