RootSegment<T> class Null safety

There should be only one RootSegment within a route_tree and it should be the root Segment

Inheritance

Constructors

RootSegment({RouteBuilder<T>? create, required RouteBuilder<T> createError, List<Segment<T>> children = const [], List<SegmentVerifier<T>> verifiers = const [findConflictingParamKeys]})
Creates a RootSegment [...]

Properties

children Iterable<Segment<T>>
read-only, inherited
create RouteBuilder<T>?
Creates an instance of T, called when the Segment that owns this callback is routed to.
final, inherited
createError RouteBuilder<T>
If Segment.parse cannot find a matching route the bottom most createError is called instead. [...]
final
hashCode int
The hash code for this object. [...]
read-only, inherited
parser SegmentParser
The parser that handles whether this Segment matches a route.
final, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
verifiers List<SegmentVerifier<T>>
Functions that get called by verify sequentially. Can be used to ensure that the route tree satisfies certain conditions. [...]
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
parse(ParseContext<T> context, Iterable<String> segments, RouteBuilder<T> createError) Result<T, T>?
Returns a Result<T, T>? where null means this doesn't match the current path segment, Result.ok means a match was found and Result.err means an error was encountered trying to parse the path segments. [...]
inherited
route(Uri uri) → T
Returns the matching T for uri as defined with the Segment tree
routeRaw(String name) → T
Identical to route(Uri.parse(name))
toString() String
A string representation of this object. [...]
inherited
verify() Result<void, List<String>>
Returns a Result.ok if all verifiers do, otherwise returns a Result.err with all errors returned by all verifiers.

Operators

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