operator | method

Router operator |(
  1. Middleware middleware
)

Register a Middleware to the router.

Returns the left-hand side Router.

Note: This is a convenience method for Router.use.

final router = Router();

router | Middleware();

Implementation

Router operator |(Middleware middleware) => this..use(middleware);