Guards<T extends GuardBase> class
The guy in charge of your system-wide guards. Everything you should use for guards should be here
Constructors
-
Guards.new({required PersistenceDelegate? persistenceDelegate, required List<
T> initialGuards}) - The guy in charge of your system-wide guards. Everything you should use for guards should be here
Properties
-
guardListenableStream
→ Stream<
GuardsStatusChange> -
Define this in your App's routerConfig's reevaluateListenable
no setter
-
guards
↔ List<
T> -
The list of guards that will be checked for the system
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- persistenceDelegate ↔ PersistenceDelegate?
-
The delegate that will be used for checking the guards in memory, leave
it null if you want the guards to be checked on demand, always
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addGuard(
T guard) → Future< void> - Call this when you are ready to add a guard that weren't able during bootstrap time.
-
getGuardByGuardIdentifier<
R extends T> (String identifier) → R - The way of obtaining guard through its identifier
-
init(
) → Future< void> -
Call this function in your project's bootstrap. Ensure the guards defined
here contains all the necessary for being setup, otherwise add them later
with
addGuard
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited