RouteInterceptorManager class

Manages route interceptors globally and per route basis.

Constructors

RouteInterceptorManager()
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addAllRouteInterceptors(Map<String, List<RouteInterceptor>> interceptorsMap) → void
Merges another map of route-specific interceptors.
addGlobalInterceptor(RouteInterceptor interceptor) → void
Adds a global interceptor to be applied to all routes.
addGlobalInterceptors(List<RouteInterceptor> interceptors) → void
Adds a list of global interceptors to be applied to all routes.
addRouteInterceptors(String routeName, List<RouteInterceptor> interceptors) → void
Adds interceptors for a specific route by its name.
clearGlobalInterceptors() → void
Clears all global interceptors.
clearRouteInterceptors() → void
Clears all route-specific interceptors.
intercept(String routeName, {Object? arguments}) Future<RouteInterceptResult>
Runs the interceptors, starting with route-specific ones (if any) and falling back to global interceptors. Returns a RouteInterceptResult that includes the action taken by the interceptor.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeGlobalInterceptor(RouteInterceptor interceptor) → void
Removes a global interceptor.
removeRouteInterceptors(String routeName) → void
Removes all interceptors for a specific route by its name.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited