QRoute class
Define a route
Constructors
-
QRoute({required String path, required PageBuilder? builder, String? name, QPage? pageType, List<
QMiddleware> ? middleware, List<QRoute> ? children, Map<String, dynamic> meta = const {}}) -
const
-
QRoute.declarative({required String path, required PageWithDeclarativeBuilder? declarativeBuilder, String? name, QPage? pageType, List<
QMiddleware> ? middleware, Map<String, dynamic> meta = const {}}) -
Define a declarative router
const
-
QRoute.withChild({required String path, required PageWithChildBuilder? builderChild, String? initRoute, String? name, QPage? pageType, List<
QMiddleware> ? middleware, List<QRoute> ? children, List<NavigatorObserver> ? observers, String? restorationId, Map<String, dynamic> meta = const {}}) -
Call this function to get a QRouter to use it for Nested Navigation
const
Properties
- builder → PageBuilder?
-
The default widget builder for this route
final
- builderChild → PageWithChildBuilder?
-
Widget builder with a QRouter for the nested navigation
use it with QRoute.withChild
final
-
children
→ List<
QRoute> ? -
The children for this route
final
- declarativeBuilder → PageWithDeclarativeBuilder?
-
used when you want to use declarative router
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- initRoute → String?
-
Set the initPath for the route, used with QRoute.withChild
final
- isDeclarative → bool
-
no setter
-
meta
→ Map<
String, dynamic> -
The meta data for this route
you can use it to pass any data to the route
and receive it using the navigator
final
-
middleware
→ List<
QMiddleware> ? -
Define a Middlewares for this route
with
QMiddleware
or QMiddlewareBuilder More infofinal - name → String?
-
The name for this route
final
-
observers
→ List<
NavigatorObserver> ? -
A list of observers for this navigator.
final
- pageType → QPage?
-
Set the page type for this route
you can use QMaterialPage, QCupertinoPage or QPlatformPage
The default is QPlatformPage More info
final
- path → String
-
Set the path to this Route
then use
QR.to()
to navigate to it.final - restorationId → String?
-
Restoration ID to save and restore the state of the navigator, including
its history.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- withChildRouter → bool
-
does this route use QRouter
no setter
Methods
-
copyWith(
{String? path, String? name, PageBuilder? builder, PageWithChildBuilder? builderChild, QPage? pageType, List< QMiddleware> ? middleware, String? initRoute, List<QRoute> ? children, List<NavigatorObserver> ? observers, String? restorationId, Map<String, dynamic> ? meta}) → QRoute -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited