isBiometricSupported method

Future<bool> isBiometricSupported()

Checks whether biometric authentication is supported on the device.

Implementation

Future<bool> isBiometricSupported() async {
  try {
    bool canCheckBiometrics = await _auth.canCheckBiometrics;
    bool isDeviceSupported = await _auth.isDeviceSupported();
    return canCheckBiometrics && isDeviceSupported;
  } catch (e) {
    debugPrint('Error checking biometric support: $e');
    return false;
  }
}