SecureGateController class

Constructors

SecureGateController({bool lockOnStart = true, Widget overlayBuilder(BuildContext context, SecureGateController controller)?, FutureOr<void> onFocus(BuildContext context, SecureGateController controller)?})
Create a new instance for the controller. The SecureGate will automatically locked when it starts if lockOnStart is true.

Properties

hashCode int
The hash code for this object.
no setterinherited
isLocked bool
true if the screen is locked, otherwise is false.
no setter
isOff bool
true if the securer is inactive, otherwise is false.
no setter
isOn bool
true if the securer is active, otherwise is false.
no setter
isUnlocked bool
true if the screen is unlocked, otherwise is false.
no setter
onFocus → (FutureOr<void> Function(BuildContext context, SecureGateController controller)?)
This is a global callback that will be called when the device is focused. You can use something like biometric authentication here. If you set the overlayBuilder parameter in both SecureGateController and SecureGate, the SecureGate one will be used.
final
overlayBuilder ↔ (Widget Function(BuildContext context, SecureGateController controller)?)
A global overlay widget, this is a default overlay for all SecureGate that use the same controller. You can use the controller to lock or unlock the screen. If you set the overlayBuilder parameter in both SecureGateController and SecureGate, the SecureGate one will be used.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stream Stream<bool>
no setter

Methods

dispose() → void
Dispose this controller. You should call this when there is no SecureGate is needed to use.
lock() → void
Lock the screen.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
off({bool isUnlock = true}) → void
Turn off the controller. You cannot lock() and unlock() when the controller is turned off.
on({bool isLock = true}) → void
Turn on the controller.
toString() String
A string representation of this object.
override
unlock() → void
Unlock the screen.

Operators

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

Static Properties

instance SecureGateController
no setter