device_unlock 0.1.0 device_unlock: ^0.1.0 copied to clipboard
A Flutter plugin to request the device unlock screen..
device_unlock #
A Flutter plugin to request the device unlock screen.
Sample code #
try {
if (await DeviceUnlock.request()) {
// Unlocked successfully.
} else {
// Did not pass face, touch or pin validation.
}
} on DeviceUnlockUnavailable catch (_) {
// Device does not have face, touch or pin security available.
}
How does it work #
The following attempts and fallbacks should be made:
- Is face unlock available? Request and return true if user passed validation or false otherwise.
- Is touch unlock available? Request and return true if user passed validation or false otherwise.
- Is pin unlock available? Request and return true if user passed validation or false otherwise.
- If the device does not have face, touch or pin security, throw an exception and let the dev decide what to do.