import 'package:local_auth/local_auth.dart'; import 'package:flutter/services.dart'; import 'package:cake_wallet/generated/i18n.dart'; class BiometricAuth { final _localAuth = LocalAuthentication(); Future isAuthenticated() async { try { return await _localAuth.authenticate( localizedReason: S.current.biometric_auth_reason, options: AuthenticationOptions( biometricOnly: true, useErrorDialogs: true, stickyAuth: false)); } on PlatformException catch (e) { print(e); } return false; } Future canCheckBiometrics() async { try { return await _localAuth.canCheckBiometrics; } on PlatformException catch (e) { print(e); } return false; } }