NamedRoute class
- Inheritance
-
- Object
- HyperRoute<
RouteName> - ValueRoute<
RouteName> - NamedRoute
Constructors
-
NamedRoute({required Widget screenBuilder(BuildContext context), required RouteName name, Page pageBuilder(BuildContext context, Widget child)?, List<
HyperRoute< children = const []})RouteValue> >
Properties
-
children
→ List<
HyperRoute< RouteValue> > -
finalinherited
- defaultValue → RouteName?
-
During navigation, when a new stack is being composed, the values from the
previous stack are reused. However, if the new stack contains routes (apart from
the target route) that aren't present in the previous stack, those routes
will have to rely on their default values.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Object
-
Same as RouteValue.key
no setteroverride
- name → RouteName
-
final
- pageBuilder → Page Function(BuildContext context, Widget child)?
-
finalinherited
-
parent
↔ HyperRoute<
RouteValue> ? -
latefinalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- screenBuilder → Widget Function(BuildContext context, RouteName value)
-
finalinherited
-
urlParser
→ UrlParser<
RouteName> ? -
Provide if you've set
HyperRouter.enableUrl
totrue
.finalinherited
Methods
-
buildPage(
BuildContext context, RouteName value) → Page -
inherited
-
createFromUrl(
UrlData url) → RouteNode< RouteValue> ? -
Receives a list of url segments and returns the stack parsed from them.
The first segment in the list is matched against this route. If it does
not correspond to this route, returns null.
override
-
createNode(
{RouteNode< RouteValue> ? next, RouteName? value}) → RouteNode<RouteValue> -
override
-
createStack(
{RouteNode< RouteValue> ? next, required Map<Object, RouteValue> values}) → RouteNode<RouteValue> ? -
Creates a stack of RouteNodes from this route to the root.
inherited
-
forEach(
void action(HyperRoute< RouteValue> r)) → void -
inherited
-
nextNodeFromUrl(
UrlData url) → RouteNode< RouteValue> ? -
Finds a route that matches the url among its children and returns a stack
created from it.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
updateWithNext(
{RouteNode< RouteValue> ? next, required RouteName value}) → RouteNode<RouteValue> -
Prioritizes
next
overvalue
.inherited -
updateWithValue(
{RouteNode< RouteValue> ? next, required RouteName value}) → RouteNode<RouteValue> -
Prioritizes
value
overnext
.inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited