GuardObserver class abstract
Hooks into the lifecycle of the RouteNodeGuard pipeline.
Override the methods that are relevant to your use case (logging,
metrics, debugging). All default implementations are no-ops and must be
called via super when overridden.
Constructors
- GuardObserver()
-
Hooks into the lifecycle of the RouteNodeGuard pipeline.
const
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
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onCancel(
RouteNode origin, RouteNode target, RouteNodeGuard guard) → void -
Called when
guardreturns GuardResultCancel. -
onGuard(
RouteNode origin, RouteNode target, RouteNodeGuard guard) → void -
Called immediately before
guardis invoked. -
onGuardError(
RouteNode origin, RouteNode target, Object error, StackTrace stackTrace, RouteNodeGuard guard) → void -
Called when
guardthrowserrorwithstackTrace. -
onGuardSync(
GuardSyncReason reason) → void -
Called when a GuardSync triggers re-evaluation with
reason. -
onNext(
RouteNode origin, RouteNode target, RouteNodeGuard? guard) → void - Called when a guard returns GuardResultNext.
-
onRedirect(
RouteNode origin, RouteNode target, RouteNode redirect, RouteNodeGuard? guard) → void -
Called when
guardreturns GuardResultRedirect withredirectas the new target. -
onStart(
RouteNode origin, RouteNode target) → void -
Called before any guard runs for a mutation from
origintotarget. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited