SecureApplicationController class

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
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
secured bool
Is the application secured
hashCode int
The hash code for this object. [...]
read-only, inherited
hasListeners bool
Whether any listeners are currently registered. [...]
@protected, read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
value SecureApplicationState
The current value stored in this notifier. [...]
read / write, inherited


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 and removeListener will throw after the object is disposed). [...]
lock() → void
content under SecureGate will not be visible
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
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
unlock() → void
Use when you want your user to see content under SecureGate
unpause() → void
app switching will again provoque a lock
addListener(VoidCallback listener) → void
Register a closure to be called when the object changes. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
notifyListeners() → void
Call all the registered listeners. [...]
@protected, @visibleForTesting, inherited
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes. [...]
toString() String
Returns a string representation of this object.


operator ==(dynamic other) bool
The equality operator. [...]