Router class

Constructors

Router(App app, {String path = '', dynamic middleware, bool useRouteLater = true})

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addRoute(Route route) Router
Add a route either to this router routes list or to the current execution stack
all(String path, dynamic middleware, [Callback? callback]) Router
Register route for all HTTP method
apply([dynamic path]) → void
Apply the defined routes in this router to the current execution stack
delete(String path, dynamic middleware, [Callback? callback]) Router
Register a DELETE route
get(String path, dynamic middleware, [Callback? callback]) Router
Register a GET route
Register a HEAD route
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
options(String path, dynamic middleware, [Callback? callback]) Router
Register an OPTIONS route
patch(String path, dynamic middleware, [Callback? callback]) Router
Register a PATCH route
post(String path, dynamic middleware, [Callback? callback]) Router
Register a POST route
put(String path, dynamic middleware, [Callback? callback]) Router
Register a PUT route
toString() String
A string representation of this object.
inherited
use(dynamic path, [dynamic middleware]) Router
To register middleware(s) in a router

Operators

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