Router class mixin

Implementers

Constructors

Router()

Properties

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

Methods

add(String method, String route, Function handler, {Middleware? middleware}) → void
call(Request request) FutureOr<Response>
Route incoming requests to registered handlers.
connect(String route, Function handler) → void
Handle CONNECT request to route using handler.
delete(String route, Function handler) → void
Handle DELETE request to route using handler.
get(String route, Function handler) → void
Handle GET request to route using handler.
group(String prefix) RouterGroup
Handle HEAD request to route using handler.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
options(String route, Function handler) → void
Handle OPTIONS request to route using handler.
patch(String route, Function handler) → void
Handle PATCH request to route using handler.
post(String route, Function handler) → void
Handle POST request to route using handler.
put(String route, Function handler) → void
Handle PUT request to route using handler.
toString() String
A string representation of this object.
inherited
trace(String route, Function handler) → void
Handle TRACE request to route using handler.

Operators

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

Static Properties

routeNotFound Response
Sentinel Response object indicating that no matching route was found.
final