snippets
library
Functions
-
getAfterMiddleware<T>(Middleware<T> middleware, Middleware<T> afterMiddleware)
→ Middleware<T>
-
Runs the second middleware after the main
-
getBeforeMiddleware<T>(Middleware<T> beforeMiddleware, Middleware<T> middleware)
→ Middleware<T>
-
Runs the second middleware before the main
-
getBranchMiddleware<T>(dynamic condition, Middleware<T> trueMiddleware, Middleware<T> falseMiddleware)
→ Middleware<T>
-
By condition splits the middleware
-
getCaughtMiddleware<T>(CaughtMiddlewareHandler<T> errorHandler)
→ Middleware<T>
-
Catches errors in the middleware chain
-
getConcurrencyMiddleware<T>(Iterable<Middleware<T>> middlewares)
→ Middleware<T>
-
Concurrently launches middleware,
the chain will continue if
next()
is called in all middlewares
-
getEnforceMiddleware<T>(Middleware<T> beforeMiddleware, Middleware<T> middleware, Middleware<T> afterMiddleware)
→ Middleware<T>
-
Runs middleware before and after the main
-
getFilterMiddleware<T>(dynamic condition, Middleware<T> filterMiddleware)
→ Middleware<T>
-
Conditionally runs middleware or stops the chain
-
getForkMiddleware<T>(Middleware<T> middleware)
→ Middleware<T>
-
Runs the middleware at the next event loop and force call
next()
-
getLazyMiddleware<T>(LazyMiddlewareFactory<T> factory)
→ Middleware<T>
-
Lazily asynchronously gets middleware
-
getOptionalMiddleware<T>(dynamic condition, Middleware<T> optionalMiddleware)
→ Middleware<T>
-
Conditionally runs optional middleware or skips middleware
-
getTapMiddleware<T>(Middleware<T> middleware)
→ Middleware<T>
-
Runs the middleware and force call
next()
-
skipMiddleware<T>(T context, NextMiddleware next)
→ dynamic
-
Call
next()
in middleware
-
stopMiddleware<T>(T context, NextMiddleware next)
→ Future
-
Does not call
next()
in middleware