SecureApplicationController class Null safety

main controller for the library

secured mean that the application will lock if the user switch out of the app on Android it will prevent user from taking screenshot/recordvideo in the app on iOS/Android it will hide content in the app switcher on iOS/Android it will lock SecureApplicationController.locked = true when it become active again when locked if a gate depends on this controller it will display the blurry gate to obfuscate content



SecureApplicationController(SecureApplicationState value)


authenticated bool
helper that hold las authentication status default to false allow you to hide or show content depending on authentication status
authenticationEvents Stream<SecureApplicationAuthenticationStatus>
Broadcast stream that you can use to react to succesffull or unsuccessfull event default to SecureApplicationAuthenticationStatus.NONE BehaviorSubject stream so it will always emit last sent value as soon as you listen will trigger with the result of SecureApllication.onNeedUnlock
hashCode int
The hash code for this object.
read-only, inherited
hasListeners bool
Whether any listeners are currently registered.
@protected, read-only, inherited
locked bool
Is the application Locked if locked gates will hide their children content will be automatically set to yes when user switch back to app can be triggered with lock() manually to activates gates on your own volution
lockEvents Stream<bool>
Broadcast stream that you can use to react to lock/unlock event default to false BehaviorSubject stream so it will always emit last sent value as soon as you listen
paused bool
if paused lock will not be set when they get back to the app could be usefull for example when you open an image or file picker
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
secured bool
Is the application secured
value SecureApplicationState
The current value stored in this notifier.
read / write, inherited


addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
authFailed({bool unlock = false}) → void
authLogout({bool unlock = false}) → void
authSuccess({bool unlock = false}) → void
dispose() → void
Discards any resources used by the object. After this is called, the object is not in a usable state and should be discarded (calls to addListener will throw after the object is disposed).
lock() → void
content under SecureGate will not be visible
lockIfSecured() → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
notifyListeners() → void
Call all the registered listeners.
open() → void
App will no longer be secured and content will be visible if user switch app
pause() → void
temporary prevent the app from locking if use leave and come back to the app
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
resumed() → void
Use to warn gates that the app resumed used internally only
secure() → void
App will be secured and content will not be visible if user switch app
sendAuthenticationEvent(SecureApplicationAuthenticationStatus status) → void
notify listener of the SecureApplicationController.authenticationEvents of a failure or success to allow them for example to clear sensitive data
toString() String
A string representation of this object.
unlock() → void
Use when you want your user to see content under SecureGate
unpause() → void
app switching will again provoque a lock


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