type property
Future<BiometricType>
type
Get the BiometricType
available on the device.
BiometricType.FACE BiometricType.FINGERPRINT BiometricType.IRIS BiometricType.MULTIPLE BiometricType.NONE BiometricType.NO_HARDWARE BiometricType.UNAVAILABLE BiometricType.UNSUPPORTED
Implementation
static Future<BiometricType> get type async {
try {
final String? type = await _channel.invokeMethod('type');
print('Biometric type: $type');
switch (type) {
case 'FACE':
return BiometricType.FACE;
case 'FINGERPRINT':
return BiometricType.FINGERPRINT;
case 'IRIS':
return BiometricType.IRIS;
case 'MULTIPLE':
return BiometricType.MULTIPLE;
case 'NONE':
return BiometricType.NONE;
case 'NO_HARDWARE':
return BiometricType.NO_HARDWARE;
case 'UNAVAILABLE':
return BiometricType.UNAVAILABLE;
default:
return BiometricType.UNSUPPORTED;
}
} on Exception {}
return BiometricType.UNSUPPORTED;
}