GroupBuilder class

Mixed-in types

Constructors

GroupBuilder(Muxable parent, {String path = ''})

Properties

after List<RouteInterceptor>
final
before List<RouteInterceptor>
final
hashCode int
The hash code for this object.
no setterinherited
onException List<ExceptionHandler>
final
parent Muxable
final
path String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

add(Iterable<Route> routes) → void
Adds all the given routes to be served
override
addRoute(Route route) Route
Adds a route to the muxer
override
delete(String path, RouteHandler handler, {Map<String, String>? pathRegEx, int statusCode = 200, String? mimeType, String? charset = kDefaultCharset, ResponseProcessor? responseProcessor, List<RouteInterceptor>? after, List<RouteInterceptor>? before, List<ExceptionHandler>? onException}) Route
Adds a route with DELETE method to be served
inherited
deleteJson(String path, RouteHandler handler, {Map<String, String>? pathRegEx, int statusCode = 200, String? mimeType, String? charset = kDefaultCharset, ResponseProcessor? responseProcessor = jsonResponseProcessor, List<RouteInterceptor>? after, List<RouteInterceptor>? before, List<ExceptionHandler>? onException}) Route
Adds a route with DELETE method to be served
inherited
get(String path, RouteHandler handler, {Map<String, String>? pathRegEx, int statusCode = 200, String? mimeType, String? charset = kDefaultCharset, ResponseProcessor? responseProcessor, List<RouteInterceptor>? after, List<RouteInterceptor>? before, List<ExceptionHandler>? onException}) Route
Adds a route with GET method to be served
inherited
getJson(String path, RouteHandler handler, {Map<String, String>? pathRegEx, int statusCode = 200, String? mimeType, String? charset = kDefaultCharset, ResponseProcessor? responseProcessor = jsonResponseProcessor, List<RouteInterceptor>? after, List<RouteInterceptor>? before, List<ExceptionHandler>? onException}) Route
Adds a route with GET method to be served
inherited
group({String path = ''}) GroupBuilder
html(String path, RouteHandler handler, {Map<String, String>? pathRegEx, int statusCode = 200, String? mimeType = MimeTypes.html, String? charset = kDefaultCharset, ResponseProcessor? responseProcessor, List<RouteInterceptor>? after, List<RouteInterceptor>? before, List<ExceptionHandler>? onException}) Route
Adds a route with GET method to be served
inherited
json(String path, RouteHandler handler, {Map<String, String>? pathRegEx, List<String> methods = const <String>['GET', 'PUT', 'POST', 'DELETE'], int statusCode = 200, String? mimeType, String? charset = kDefaultCharset, ResponseProcessor? responseProcessor = jsonResponseProcessor, List<RouteInterceptor>? after, List<RouteInterceptor>? before, List<ExceptionHandler>? onException}) Route
Adds a route to be served
inherited
map(Map<String, dynamic> handlers, {List<RouteInterceptor> before = const [], List<RouteInterceptor> after = const [], List<ExceptionHandler> onException = const []}) → void
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
options(String path, RouteHandler handler, {Map<String, String>? pathRegEx, int statusCode = 200, String? mimeType, String? charset = kDefaultCharset, ResponseProcessor? responseProcessor, List<RouteInterceptor>? after, List<RouteInterceptor>? before, List<ExceptionHandler>? onException}) Route
Adds a route with OPTIONS method to be served
inherited
patch(String path, RouteHandler handler, {Map<String, String>? pathRegEx, int statusCode = 200, String? mimeType, String? charset = kDefaultCharset, ResponseProcessor? responseProcessor, List<RouteInterceptor>? after, List<RouteInterceptor>? before, List<ExceptionHandler>? onException}) Route
Adds a route with PATCH method to be served
inherited
post(String path, RouteHandler handler, {Map<String, String>? pathRegEx, int statusCode = 200, String? mimeType, String? charset = kDefaultCharset, ResponseProcessor? responseProcessor, List<RouteInterceptor>? after, List<RouteInterceptor>? before, List<ExceptionHandler>? onException}) Route
Adds a route with POST method to be served
inherited
postJson(String path, RouteHandler handler, {Map<String, String>? pathRegEx, int statusCode = 200, String? mimeType, String? charset = kDefaultCharset, ResponseProcessor? responseProcessor = jsonResponseProcessor, List<RouteInterceptor>? after, List<RouteInterceptor>? before, List<ExceptionHandler>? onException}) Route
Adds a route with POST method to be served
inherited
put(String path, RouteHandler handler, {Map<String, String>? pathRegEx, int statusCode = 200, String? mimeType, String? charset = kDefaultCharset, ResponseProcessor? responseProcessor, List<RouteInterceptor>? after, List<RouteInterceptor>? before, List<ExceptionHandler>? onException}) Route
Adds a route with PUT method to be served
inherited
putJson(String path, RouteHandler handler, {Map<String, String>? pathRegEx, int statusCode = 200, String? mimeType, String? charset = kDefaultCharset, ResponseProcessor? responseProcessor = jsonResponseProcessor, List<RouteInterceptor>? after, List<RouteInterceptor>? before, List<ExceptionHandler>? onException}) Route
Adds a route with PUT method to be served
inherited
route(String path, RouteHandler handler, {Map<String, String>? pathRegEx, List<String> methods = const <String>['GET', 'PUT', 'POST', 'DELETE'], int statusCode = 200, String? mimeType, String? charset = kDefaultCharset, ResponseProcessor? responseProcessor, List<RouteInterceptor>? after, List<RouteInterceptor>? before, List<ExceptionHandler>? onException}) Route
Adds a route to be served
inherited
staticFile(String path, dynamic file, {Map<String, String>? pathRegEx, int statusCode = 200, String? mimeType, String? charset = kDefaultCharset, ResponseProcessor? responseProcessor, Iterable<String? Function(File)>? mimeTypeDetectors}) Route
Serves requests at path with content of file
inherited
staticFiles(String path, dynamic directory, {Map<String, String>? pathRegEx, int statusCode = 200, String? mimeType, String? charset = kDefaultCharset, ResponseProcessor? responseProcessor, bool stripPrefix = true, Future<Response> directoryLister(Directory directory)?, Iterable<String? Function(File)>? mimeTypeDetectors}) Route
Serves requests for static files at path from directory
inherited
toString() String
A string representation of this object.
inherited
wsEcho(String path, {Map<String, String>? pathRegEx, List<RouteInterceptor>? after, List<RouteInterceptor>? before, List<ExceptionHandler>? onException}) Route
Example: server.wsEcho('/ws');
inherited
wsResponder(String path, WsOnConnect onConnect, {Map<String, String>? pathRegEx, List<RouteInterceptor>? after, List<RouteInterceptor>? before, List<ExceptionHandler>? onException}) Route
Example: server.wsEcho('/ws');
inherited
wsStream(String path, WsOnConnect onConnect, {Map<String, String>? pathRegEx, List<RouteInterceptor>? after, List<RouteInterceptor>? before, List<ExceptionHandler>? onException}) Route
Example: server.wsStream('/ws', (ctx, ws) => Stream.periodic);
inherited

Operators

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