setRoutes static method

void setRoutes(
  1. Map<int, String> routes,
  2. List<WorkFlowModel> workflows,
  3. dynamic onNext(
    1. dynamic
    )
)

Sets the routes and workflows for the app.

The routesMap contains all the available routes, and workFlows define the screens a user should go through based on their choices. The callback is used to navigate to the correct screen.

  • routesMap A map of integer IDs to routes.
  • workFlows A list of WorkFlowModel defining screen sequences.
  • onNext The function to execute when navigating to the next screen.

Implementation

static void setRoutes(Map<int, String> routes, List<WorkFlowModel> workflows, Function(dynamic) onNext) {
  _workFlowController = WorkFlowController(routes: routes, workflows: workflows,onNext: onNext);
}