setRoutes static method
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.
routesMapA map of integer IDs to routes.workFlowsA list ofWorkFlowModeldefining screen sequences.onNextThe 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);
}