lock method
Results in displaying lock screen overlay. Intended to be triggered by the Authenticator, but could
also be triggered manually, i.e., from your application's code. In case there's a need to trigger the
lock screen manually, keep in mind that this will create a non-dismissable overlay that can only be
removed by authenticating with the correct pin / biometrics. For this reason it is important to
never trigger lock method manually if authentication is not enabled.
Triggering the lock screen manually will not persist accross sessions.
availableMethods
refer to BiometricMethods that the device supports, or an empty list if the
device doesn't support biometrics or the user has not opted in to using it.
Implementation
void lock({required List<BiometricMethod> availableMethods}) {
_streamController.add(Locked(availableBiometricMethods: availableMethods));
}