MiddlewareObject class abstract

An abstract base class for classes that behave like Middleware.

Instances of MiddlewareObject are callable as Middleware, and can be passed as middleware via a call tear-off.

Overriding call is mandatory.

If the middleware requires special path parameters, then you should override injectIn.

Implemented types
Implementers

Constructors

MiddlewareObject()
const

Properties

asMiddleware Middleware
Returns this MiddlewareObject as a Middleware function.
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

call(Handler next) Handler
The implementation of this MiddlewareObject
injectIn(Router<Handler> router) → void
Use this middleware on router on path /. Override to use on a different path.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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