middleware property

Middleware<T> middleware

Getter for Middleware that can use in Dia App

Implementation

Middleware<T> get middleware => (T ctx, next) async {
      /// check prefix
      final savedPrefix = ctx.routerPrefix;
      await _handle(ctx);
      ctx.routerPrefix = savedPrefix;
      await next();
    };