PatchFormat.fromJson constructor

PatchFormat.fromJson(
  1. dynamic data
)

Creates a PatchFormat instance from a JSON representation.

Implementation

PatchFormat.fromJson(dynamic data) {
  switch (data) {
    case "PatchOnly":
    case "A4":
    case "A4_LANDSCAPE":
    case "US_Letter":
    case "US_Letter_LANDSCAPE":
      _value = data;
      break;
    default:
      throw Exception('Unknown enum value to decode: $data');
  }
}