Router class

Constructors

Router()

Properties

hashCode int
The hash code for this object.
no setterinherited
routes Map<HttpMethod, Map<String, Handler>>
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addRoute(Route r) → void
delete(String path, Handler handler, {List<HttpMiddleware> middleware = const []}) → void
dispatch(HttpRequest request) → void
get(String path, Handler handler, {List<HttpMiddleware> middleware = const []}) → void
group({String prefix = '', List<HttpMiddleware> middleware = const [], required void routes()}) → void
listRoutes() Map<HttpMethod, List<String>>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
patch(String path, Handler handler, {List<HttpMiddleware> middleware = const []}) → void
post(String path, Handler handler, {List<HttpMiddleware> middleware = const []}) → void
put(String path, Handler handler, {List<HttpMiddleware> middleware = const []}) → void
toString() String
A string representation of this object.
inherited

Operators

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