Created
December 16, 2019 02:31
-
-
Save Classy-Bear/f5c857c9646e9d532c838798aa6235ea to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Future<void> _autorizar() async { | |
bool isAuthorized = false; | |
try { | |
isAuthorized = await _autenticacion.authenticateWithBiometrics( | |
localizedReason: "Autentíquese para completar su transacción", | |
useErrorDialogs: true, | |
stickyAuth: true, | |
); | |
} on PlatformException catch (e) { | |
print(e); | |
} | |
if (!mounted) return; | |
setState(() { | |
if (isAuthorized) { | |
_autorizado = "Autorizado"; | |
} else { | |
_autorizado = "No autorizado"; | |
} | |
print("Autorizado? $_autorizado"); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment