createDelegate method

GetDelegate createDelegate({
  1. GetPage? notFoundRoute,
  2. List<NavigatorObserver>? navigatorObservers,
  3. TransitionDelegate? transitionDelegate,
  4. PopMode backButtonPopMode = PopMode.History,
  5. PreventDuplicateHandlingMode preventDuplicateHandlingMode = PreventDuplicateHandlingMode.ReorderRoutes,
})

Implementation

GetDelegate createDelegate({
  GetPage<dynamic>? notFoundRoute,
  List<NavigatorObserver>? navigatorObservers,
  TransitionDelegate<dynamic>? transitionDelegate,
  PopMode backButtonPopMode = PopMode.History,
  PreventDuplicateHandlingMode preventDuplicateHandlingMode =
      PreventDuplicateHandlingMode.ReorderRoutes,
}) {
  if (routerDelegate == null) {
    return routerDelegate = GetDelegate(
      notFoundRoute: notFoundRoute,
      navigatorObservers: navigatorObservers,
      transitionDelegate: transitionDelegate,
      backButtonPopMode: backButtonPopMode,
      preventDuplicateHandlingMode: preventDuplicateHandlingMode,
    );
  } else {
    return routerDelegate as GetDelegate;
  }
}