Middleware<T> class Null safety

The base class for request and response middlewares

A Middleware runs before and after and endpoint does

Constructors

Middleware()
Constructor [...]

Properties

appendAtBegin bool
If appendOverride is not null, is used to verify if this Middleware must be appended at the begin
read-only
appendOverride → (bool Function?(String method, String uri)?)
Used to verify if a Middleware must be appended to different endpoints
read-only
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
singleton bool
This Middleware is a singleton: the same instance goes to every endpoint
read-only

Methods

clone() Middleware<T>
Executed when your middleware is not a singleton [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
onHandle(T data) Future<T>
Executed every time a Request or a Response should pass in this Middleware [...]
onInit(String uri, String method) Future<void>
Executed one time when the Middleware is initialized [...]
toString() String
A string representation of this object. [...]
inherited

Operators

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