addMiddleware static method
Registers a new LevitReactiveMiddleware to intercept or observe state changes.
If token is provided, registration is unique for that token.
Implementation
static LevitReactiveMiddleware addMiddleware(
LevitReactiveMiddleware middleware, {
Object? token,
}) {
return LevitReactiveMiddleware.add(middleware, token: token);
}