import 'package:local_auth/local_auth.dart'; class BiometricHelper { static final LocalAuthentication auth = LocalAuthentication(); static Future checkBiometrics() async { try { return await auth.canCheckBiometrics; } catch (e) { // Log or handle the error return false; } } static Future authenticateBiometric() async { try { return await auth.authenticate( localizedReason: 'Scan your fingerprint to authenticate', options: const AuthenticationOptions( biometricOnly: true, stickyAuth: true, useErrorDialogs: true, sensitiveTransaction: true, ), ); } catch (e) { // Log or handle the error return false; } } }