getTapMiddleware<T> function

Middleware<T> getTapMiddleware<T>(
  1. Middleware<T> middleware
)

Runs the middleware and force call next()

Example:

getTapMiddleware((context) {
  print('Context $context');
});

Implementation

// ignore: prefer_expression_function_bodies
Middleware<T> getTapMiddleware<T>(Middleware<T> middleware) {
  return (context, next) async {
    await middleware(context, noopNext);
    await next();
  };
}