getEnrolledBiometrics method
Returns a list of enrolled biometrics.
Possible values include:
- BiometricType.face
- BiometricType.fingerprint
- BiometricType.iris (not yet implemented)
- BiometricType.strong
- BiometricType.weak
Implementation
@override
Future<List<BiometricType>> getEnrolledBiometrics() async {
final List<String> result = (await _channel.invokeListMethod<String>(
'getAvailableBiometrics',
)) ??
<String>[];
final List<BiometricType> biometrics = <BiometricType>[];
for (final String value in result) {
switch (value) {
case 'face':
biometrics.add(BiometricType.face);
case 'fingerprint':
biometrics.add(BiometricType.fingerprint);
case 'iris':
biometrics.add(BiometricType.iris);
case 'undefined':
// Sentinel value for the case when nothing is enrolled, but hardware
// support for biometrics is available.
break;
}
}
return biometrics;
}