route_tree library Null safety

route_tree provides a declarative way of defining routers.

Classes

IntParser
A SegmentParser that matches an integer and injects it into the ParseContext
LiteralParser
SegmentParser that matches a String literally with String.operator==.
ParamParser<T>
Base class for parsers that inject a key-value pair into the ParseContext
ParamSegment<T>
A Segment for path parameters [...]
ParseContext<T>
The parse state consisting of the uri and parameters injected into it [...]
ParseParamResult
Marker interface for ParseResults that should get injected into a ParseContext
ParseResult
The result of a parse operation, where [...]
PathSegment<T>
A Segment for literal path segments
RegExpParamParser<T>
SegmentParser that matches a segment against the supplied regExp, like RegExpParser, except that it also injects the resulting key-value pair into the ParseContext, which can be queried from Segment.create or Segment.createError.
RegExpParamSegment<T>
A Segment for path segments that should match a regular expression, where you need the segment itself, too. [...]
RegExpParser
SegmentParser that matches a segment against the supplied regExp.
RegExpPathSegment<T>
A Segment for path segments that match a regular expression [...]
RootSegment<T>
There should be only one RootSegment within a route_tree and it should be the root Segment
Segment<T>
Represents a single node in a route tree. [...]
SegmentParser
Handles parsing of single path segments for Segments. [...]
UintParser
A SegmentParser that matches an unsigned integer (like an id) and injects it into the ParseContext

Functions

findConflictingParamKeys<T>(Segment<T> current, String path) Result<void, String>

Typedefs

Parser(ParseContext context, String source) ParseResult
A function tha defines a predicate by which path segments are matched [...]
RouteBuilder<T>(ParseContext<T> context) → T
A function that gets called if its owning Segment matches a path. [...]
SegmentVerifier<T>(Segment<T> current, String path) Result<void, String>
A function that gets called with the RootSegment. [...]
ValueParser(ParseContext context, String source) ParseParamResult
A function that defines a predicate by which path segments are matched and returns a ParseParamResult. [...]

Exceptions / Errors

ValidationError