HierarchySegment class

An abstract representation of a RouteMatch

This is meant to be used in testing to verify current hierarchy

e.g expect(router.currentHierarchy(),[ HierarchySegment(name: HomeRoute.name, children: HierarchySegment(Tab1Route.name), ), ] );

Constructors

HierarchySegment(String name, {Parameters? pathParams, Parameters? queryParams, List<HierarchySegment> children = const []})
Default constructor
const

Properties

children List<HierarchySegment>
The list of sub-child routes if any
final
hashCode int
The hash code for this object.
no setteroverride
name String
The name of the route
final
pathParams Parameters?
The path parameters of the route
final
queryParams Parameters?
The path parameters of the route
final
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
toJson() Map<String, dynamic>
Returns a pretty json output of this hierarchy
toString() String
A string representation of this object.
override

Operators

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