Pdf417ErrorLevel.fromJson constructor

Pdf417ErrorLevel.fromJson(
  1. dynamic data
)

Creates a Pdf417ErrorLevel instance from a JSON representation.

Implementation

Pdf417ErrorLevel.fromJson(dynamic data) {
  switch (data) {
    case "Level0":
    case "Level1":
    case "Level2":
    case "Level3":
    case "Level4":
    case "Level5":
    case "Level6":
    case "Level7":
    case "Level8":
      _value = data;
      break;
    default:
      throw Exception('Unknown enum value to decode: $data');
  }
}