Router class
Properties
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
routes
→ List<RouteData>
-
no setter
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
Static Methods
-
any(String path, Function action)
→ Router
-
Adds a route that responds to any HTTP method.
-
basePrefix(String prefix)
→ void
-
Sets the base prefix for all routes.
-
copy(String path, Function action)
→ Router
-
Adds a COPY route.
-
delete(String path, Function action)
→ Router
-
Adds a DELETE route.
-
get(String path, Function action)
→ Router
-
Adds a GET route.
-
group(Function callBack, {String? prefix, List<Middleware>? middleware, String? domain})
→ void
-
Groups a set of routes under a common prefix, middleware, and/or domain.
-
link(String path, Function action)
→ Router
-
Adds a LINK route.
-
lock(String path, Function action)
→ Router
-
Adds a LOCK route.
-
options(String path, Function action)
→ Router
-
Adds an OPTIONS route.
-
patch(String path, Function action)
→ Router
-
Adds a PATCH route.
-
post(String path, Function action)
→ Router
-
Adds a POST route.
-
propfind(String path, Function action)
→ Router
-
Adds a PROPFIND route.
-
purge(String path, Function action)
→ Router
-
Adds a PURGE route.
-
put(String path, Function action)
→ Router
-
Adds a PUT route.
-
resource(String path, dynamic action)
→ Router
-
Adds a set of resource routes.
-
unlink(String path, Function action)
→ Router
-
Adds an UNLINK route.
-
unlock(String path, Function action)
→ Router
-
Adds an UNLOCK route.
-
websocket(String path, dynamic eventCallBack(WebSocketEvent), {List<WebSocketMiddleware>? middleware})
→ void
-
Adds a websocket route.