addMiddleware method
Adds a middleware to this command. Middlewares are invoked in the order they are added.
Implementation
void addMiddleware(
final Middleware<FutureOr<T?>, CommandContext<O, T>> middleware,
) {
_middlewareChain.addMiddleware(middleware);
}