Skip to content

Instantly share code, notes, and snippets.

@Classy-Bear
Created December 16, 2019 02:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Classy-Bear/f5c857c9646e9d532c838798aa6235ea to your computer and use it in GitHub Desktop.
Save Classy-Bear/f5c857c9646e9d532c838798aa6235ea to your computer and use it in GitHub Desktop.
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