I'm implementing fingerprint and face recognition in my flutter app using local_auth 2.0.0. When calling getBiometrics() the docs list the following as available types:
/// Various types of biometric authentication.
/// Some platforms report specific biometric types, while others report only
/// classifications like strong and weak.
enum BiometricType {
/// Face authentication.
face,
/// Fingerprint authentication.
fingerprint,
/// Iris authentication.
iris,
/// Any biometric (e.g. fingerprint, iris, or face) on the device that the
/// platform API considers to be strong. For example, on Android this
/// corresponds to Class 3.
strong,
/// Any biometric (e.g. fingerprint, iris, or face) on the device that the
/// platform API considers to be weak. For example, on Android this
/// corresponds to Class 2.
weak,
}
My device (Android, Moto G7) only returns BiometricType.weak and BiometricType.strong - even though it supports fingerprint.
I want to check which types are available, and offer the user to login via either face or fingerprint ID. How can I be sure which is supported by the device in this case?