DefaultRouterDelegate constructor

DefaultRouterDelegate({
  1. required BuildContext context,
  2. required void onNestedPathUpdate(
    1. AdvancedRouteInformation?
    ),
  3. required String initialLocation,
  4. required Map<PathGroup, List<Page> Function(PathArguments)> paths,
  5. required PathFactory? onGeneratePath,
  6. required PathFactory? onUnknownPath,
  7. required Map<String, Page Function(Object?)> pages,
  8. required PageFactory? onGeneratePage,
  9. required PageFactory? onUnknownPage,
  10. required PopPageCallback? onPopPage,
  11. required RouteFactory? onGenerateRoute,
  12. required RouteFactory? onUnknownRoute,
  13. required TransitionDelegate transitionDelegate,
  14. required bool reportsRouteUpdateToEngine,
  15. required List<NavigatorObserver> observers,
  16. required String? restorationScopeId,
  17. required String? tag,
})

Implementation

DefaultRouterDelegate({
  required this.context,
  required this.onNestedPathUpdate,
  required this.initialLocation,
  required this.paths,
  required this.onGeneratePath,
  required this.onUnknownPath,
  required this.pages,
  required this.onGeneratePage,
  required this.onUnknownPage,
  required this.onPopPage,
  required this.onGenerateRoute,
  required this.onUnknownRoute,
  required this.transitionDelegate,
  required this.reportsRouteUpdateToEngine,
  required this.observers,
  required this.restorationScopeId,
  required this.tag,
}) : assert(paths.isNotEmpty ||
          onGeneratePath != null ||
          onUnknownPath != null);