NestedRoute class

Constructors

NestedRoute({required Alfred alfred, required String basePath, required List<FutureOr Function(HttpRequest req, HttpResponse res)> baseMiddleware})

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

all(String path, FutureOr callback(HttpRequest req, HttpResponse res), {List<FutureOr Function(HttpRequest req, HttpResponse res)> middleware = const []}) HttpRoute
Create a route that listens on all methods
delete(String path, FutureOr callback(HttpRequest req, HttpResponse res), {List<FutureOr Function(HttpRequest req, HttpResponse res)> middleware = const []}) HttpRoute
Create a delete route
get(String path, FutureOr callback(HttpRequest req, HttpResponse res), {List<FutureOr Function(HttpRequest req, HttpResponse res)> middleware = const []}) HttpRoute
Create a get route
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
options(String path, FutureOr callback(HttpRequest req, HttpResponse res), {List<FutureOr Function(HttpRequest req, HttpResponse res)> middleware = const []}) HttpRoute
Create an options route
patch(String path, FutureOr callback(HttpRequest req, HttpResponse res), {List<FutureOr Function(HttpRequest req, HttpResponse res)> middleware = const []}) HttpRoute
Create a patch route
post(String path, FutureOr callback(HttpRequest req, HttpResponse res), {List<FutureOr Function(HttpRequest req, HttpResponse res)> middleware = const []}) HttpRoute
Create a post route
put(String path, FutureOr callback(HttpRequest req, HttpResponse res), {List<FutureOr Function(HttpRequest req, HttpResponse res)> middleware = const []}) HttpRoute
Create a put route
route(String path, {List<FutureOr Function(HttpRequest req, HttpResponse res)> middleware = const []}) NestedRoute
Creates one or multiple route segments that can be used as a common base for specifying routes with get, post, etc.
toString() String
A string representation of this object.
inherited

Operators

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