RouteNode<TArgs> class
abstract
Base class for all nodes in the safe routing tree.
A RouteNode represents a single element in the route hierarchy. It can be either:
- a SafeRoute (a leaf node with a page builder)
- a
SafeNestedRoute
(a container grouping other routes)
Each node has:
- name → the relative path (e.g.
"/settings"
) _parent
→ reference to its parent node
Together, they allow constructing a full path by walking up the tree.
Example:
final profileRoute = SafeRoute<String, void>(
name: '/profile',
builder: (_, username) => ProfilePage(username: username),
);
final accountRoutes = SafeNestedRoute(
name: '/account',
routes: [profileRoute],
);
// profileRoute.fullPath == "/account/profile"
- Implementers
Constructors
- RouteNode.new({required String name})
-
Creates a new route node with a given
name
.
Properties
- fullPath → String
-
The full path of this route, including all parent paths.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- name → String
-
Route path fragment (relative to its parent).
final
-
parent
↔ RouteNode<
Object?> ? -
Get parent route
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
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