type property

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;
}