PresetType.fromJson constructor

PresetType.fromJson(
  1. dynamic data
)

Creates a PresetType instance from a JSON representation.

Implementation

PresetType.fromJson(dynamic data) {
  switch (data) {
    case "HighPerformance":
    case "NormalQuality":
    case "HighQualityDetection":
    case "MaxQualityDetection":
    case "HighQuality":
    case "MaxBarCodes":
      _value = data;
      break;
    default:
      throw Exception('Unknown enum value to decode: $data');
  }
}