Middleware class abstract

The Middleware class is used to define a middleware.

Constructors

Middleware({List<String> routes = const ['*']})
The Middleware constructor is used to create a new instance of the Middleware class.
const
Middleware.shelf(Function handler, {List<String> routes = const ['*'], bool ignoreResponse = true})
The shelf factory constructor is used to create a new instance of the Middleware class.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
routes List<String>
The routes property contains the routes of the middleware.
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
use(RequestContext context, InternalResponse response, NextFunction next) Future<void>
The use method is used to execute the middleware.

Operators

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