ChildRoute<Parent extends BaseRoute> class
abstract
A route that is a descendant of another route.
Implement this interface to declare a route as a child of another route in the routing tree.
class MyRoute extends SimpleRoute implements ChildRoute<ParentRoute> {
const MyRoute();
@override
String get path => 'my-route';
@override
ParentRoute get parent => const ParentRoute();
}
Then, when navigating to this route, it will automatically construct the full path using the parent route's path.
const MyRoute().go(context);
This will navigate to '/parent-route/my-route'.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- parent → Parent
-
The parent route of this route.
no setter
- 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