ChainedRouter<T > class
Methods
addRoute (String method , String path , T handler , {Iterable <T > middleware = const [] })
→ Route <T >
Adds a route that responds to the given path
for requests with the given method (case-insensitive).
Provide '*' as the method to respond to all methods.
override
all (String path , T handler , {Iterable <T > middleware = const [] })
→ Route <T >
Adds a route that responds to any request matching the given path.
inherited
chain (Iterable <T > middleware )
→ ChainedRouter <T >
Prepends the given middleware
to any routes created
by the resulting router.
override
clone ()
→ Router <T >
Returns a Router with a duplicated version of this tree.
inherited
delete (String path , T handler , {Iterable <T > middleware = const [] })
→ Route <T >
Adds a route that responds to a DELETE request.
inherited
dumpTree ({dynamic callback (String tree )?, String tab = ' ' })
→ void
Creates a visual representation of the route hierarchy and
passes it to a callback. If none is provided, print
is called.
inherited
enableCache ()
→ void
Enables the use of a cache to eliminate the overhead of consecutive resolutions of the same path.
inherited
get (String path , T handler , {Iterable <T > middleware = const [] })
→ Route <T >
Adds a route that responds to a GET request.
inherited
group (String path , void callback (Router <T > router ), {Iterable <T > middleware = const [] , String ? name })
→ SymlinkRoute <T >
Creates a route, and allows you to add child routes to it
via a Router instance.
override
groupAsync (String path , FutureOr <void > callback (Router <T > router ), {Iterable <T > middleware = const [] , String ? name })
→ Future <SymlinkRoute <T > >
Asynchronous equivalent of group .
override
head (String path , T handler , {Iterable <T > middleware = const [] })
→ Route <T >
Adds a route that responds to a HEAD request.
inherited
mount (String path , Router <T > router )
→ SymlinkRoute <T >
Incorporates another Router 's routes into this one's.
override
navigate (Iterable linkParams , {bool absolute = true })
→ String
Generates a URI string based on the given input.
Handy when you have named routes.
inherited
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
options (String path , T handler , {Iterable <T > middleware = const {} })
→ Route <T >
Adds a route that responds to a OPTIONS request.
inherited
patch (String path , T handler , {Iterable <T > middleware = const [] })
→ Route <T >
Adds a route that responds to a PATCH request.
inherited
post (String path , T handler , {Iterable <T > middleware = const [] })
→ Route <T >
Adds a route that responds to a POST request.
inherited
put (String path , T handler , {Iterable <T > middleware = const [] })
→ Route
Adds a route that responds to a PUT request.
inherited
resolve (String absolute , String relative , List <RoutingResult <T? > > out , {String method = 'GET' , bool strip = true })
→ bool
Finds the first Route that matches the given path,
with the given method.
inherited
resolveAbsolute (String path , {String method = 'GET' , bool strip = true })
→ Iterable <RoutingResult <T > >
Returns the result of resolve with path
passed as
both absolute
and relative
.
inherited
resolveAll (String absolute , String relative , {String method = 'GET' , bool strip = true })
→ Iterable <RoutingResult <T > >
Finds every possible Route that matches the given path,
with the given method.
inherited
toString ()
→ String
A string representation of this object.
inherited