RecognitionMode.fromJson constructor

RecognitionMode.fromJson(
  1. dynamic data
)

Creates a RecognitionMode instance from a JSON representation.

Implementation

RecognitionMode.fromJson(dynamic data) {
  switch (data) {
    case 'Fast':
    case 'Normal':
    case 'Excellent':
      _value = data;
      break;
    default:
      throw Exception('Unknown enum value to decode: $data');
  }
}