RouteInfo constructor
const
RouteInfo(
- String name, {
- ScreenTitleBuilder? title,
- ScreenWidgetBuilder? builder,
- Widget? child,
- ScreenPageBuilder? pageBuilder,
- bool? isGlobalOnly,
- bool deepLinkAllowed = true,
- bool? mustBeAuthorized,
- RouterRedirect? redirect,
- bool? isPopupRoute,
- bool shouldReplaceAll = false,
- bool isTopLevelOnly = false,
- List<
String> deepLinkNames = const [], - DeepLinkHandler? deepLinkHandler,
- DuplicateRouteBehavior? duplicateBehavior,
- RoutePolicy? policy,
- 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.',
);