NamedRoute class

Inheritance

Constructors

NamedRoute({required Widget screenBuilder(BuildContext context), required RouteName name, Page pageBuilder(BuildContext context, Widget child)?, List<HyperRoute<RouteValue>> children = const []})

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 to true.
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, Completer? popCompleter}) RouteNode<RouteValue>
override
createStack({RouteNode<RouteValue>? next, required Map<Object, RouteValue> values, Map<Object, Completer> popCompleters = const {}}) 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, Completer? popCompleter}) RouteNode<RouteValue>
Prioritizes next over value.
inherited
updateWithValue({RouteNode<RouteValue>? next, required RouteName value, Completer? popCompleter}) RouteNode<RouteValue>
Prioritizes value over next.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited