RouteInfo constructor

const RouteInfo(
  1. String name, {
  2. ScreenTitleBuilder? title,
  3. ScreenWidgetBuilder? builder,
  4. Widget? child,
  5. ScreenPageBuilder? pageBuilder,
  6. bool? isGlobalOnly,
  7. bool deepLinkAllowed = true,
  8. bool? mustBeAuthorized,
  9. bool visibleNavBar = true,
  10. RouterRedirect? redirect,
  11. bool? isPopupRoute,
  12. bool shouldReplaceAll = false,
  13. bool isTopLevelOnly = false,
  14. List<String> deepLinkNames = const [],
  15. DeepLinkHandler? deepLinkHandler,
  16. DuplicateRouteBehavior? duplicateBehavior,
  17. RoutePolicy? policy,
  18. String? path,
})

Creates a standard navigation route.

Exactly one of builder, child, or pageBuilder must be provided.

Implementation

const RouteInfo(
  this.name, {
  this.title,
  this.builder,
  this.child,
  this.pageBuilder,
  this.isGlobalOnly,
  this.deepLinkAllowed = true,
  this.mustBeAuthorized,
  this.visibleNavBar = true,
  this.redirect,
  this.isPopupRoute,
  this.shouldReplaceAll = false,
  this.isTopLevelOnly = false,
  this.deepLinkNames = const [],
  this.deepLinkHandler,
  this.duplicateBehavior,
  this.policy,
  String? path,
}) : _path = path,
     isBranch = false,
     branchIndex = null,
     forRedirectionOnly = false,
     branchKey = null,
     branchParentType = null,
     assert(
       (builder != null && child == null && pageBuilder == null) ||
           (builder == null && child != null && pageBuilder == null) ||
           (builder == null && child == null && pageBuilder != null),
       'builder, child, or pageBuilder must be provided.',
     );