RouteData class

Constructors

RouteData({required String method, required String path, required dynamic controllers, bool? corsEnabled, List preMiddleware = const <dynamic>[], String? domain, Object? body})

Properties

body ↔ Object?
request body schema for the OpenAPI docs, from the body: option. any object with toJsonSchema(), like a dox_validation schema.
getter/setter pair
controllers → dynamic
final
corsEnabled → bool?
final
domain → String?
final
handler → ControllerPlan?
How to call the controller (the last function of controllers), read once. Null when the route has no controller function. Throws a StateError when a parameter type is not known.
no setter
hashCode → int
The hash code for this object.
no setterinherited
method → String
final
paramNames → List<String>
names of the params, eg. ['id'] for /blog/{id}. {path*} matches the rest of the url, slashes too. {id?} is optional: /blog and /blog/5 both match.
no setter
params ↔ Map<String, dynamic>
getter/setter pair
path ↔ String
getter/setter pair
pattern → RegExp?
regex for a route with params like /blog/{id}, built once. null for a plain route, which is matched with ==.
no setter
preMiddleware → List
middleware from groups and routers (Route.middleware, global middleware). they are also the first items of controllers.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited
withParams(Map<String, dynamic> values) → RouteData
a copy for one request, with its own params. the shared route is never changed, so two requests at the same time can not see each other's params.

Operators

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