guards library

All the necessary for your project's guard-system

Classes

CameraGuard
A guard that checks if the camera permission is granted. If not, it redirects to the cameraPermissionPath.
GuardBase
The parent class for every guard of your guard system. Extend this on an base parent class with the name of your project prefixed.
Guarded
guard your pages with this
Guards<T extends GuardBase>
The guy in charge of your system-wide guards. Everything you should use for guards should be here
GuardsStatusChange
The event that will be emitted when a guard status changes. Now tracks a sorted list of guards and their status.
LoginGuard
A guard that checks if the user is logged in. If not, it redirects to the loginPath.
PersistenceDelegate
The guy in charge of persisting the status of the guards

Functions

checkCameraPermission() Future<bool>
Checks if the camera permission is granted.

Exceptions / Errors

NonExistentGuard
Throw this error when the guard requested was not defined before.