DataMatrixVersion.fromJson constructor

DataMatrixVersion.fromJson(
  1. dynamic data
)

Creates a DataMatrixVersion instance from a JSON representation.

Implementation

DataMatrixVersion.fromJson(dynamic data) {
  switch (data) {
    case "Auto":
    case "RowsColumns":
    case "ECC000_9x9":
    case "ECC000_050_11x11":
    case "ECC000_100_13x13":
    case "ECC000_100_15x15":
    case "ECC000_140_17x17":
    case "ECC000_140_19x19":
    case "ECC000_140_21x21":
    case "ECC000_140_23x23":
    case "ECC000_140_25x25":
    case "ECC000_140_27x27":
    case "ECC000_140_29x29":
    case "ECC000_140_31x31":
    case "ECC000_140_33x33":
    case "ECC000_140_35x35":
    case "ECC000_140_37x37":
    case "ECC000_140_39x39":
    case "ECC000_140_41x41":
    case "ECC000_140_43x43":
    case "ECC000_140_45x45":
    case "ECC000_140_47x47":
    case "ECC000_140_49x49":
    case "ECC200_10x10":
    case "ECC200_12x12":
    case "ECC200_14x14":
    case "ECC200_16x16":
    case "ECC200_18x18":
    case "ECC200_20x20":
    case "ECC200_22x22":
    case "ECC200_24x24":
    case "ECC200_26x26":
    case "ECC200_32x32":
    case "ECC200_36x36":
    case "ECC200_40x40":
    case "ECC200_44x44":
    case "ECC200_48x48":
    case "ECC200_52x52":
    case "ECC200_64x64":
    case "ECC200_72x72":
    case "ECC200_80x80":
    case "ECC200_88x88":
    case "ECC200_96x96":
    case "ECC200_104x104":
    case "ECC200_120x120":
    case "ECC200_132x132":
    case "ECC200_144x144":
    case "ECC200_8x18":
    case "ECC200_8x32":
    case "ECC200_12x26":
    case "ECC200_12x36":
    case "ECC200_16x36":
    case "ECC200_16x48":
    case "DMRE_8x48":
    case "DMRE_8x64":
    case "DMRE_8x80":
    case "DMRE_8x96":
    case "DMRE_8x120":
    case "DMRE_8x144":
    case "DMRE_12x64":
    case "DMRE_12x88":
    case "DMRE_16x64":
    case "DMRE_20x36":
    case "DMRE_20x44":
    case "DMRE_20x64":
    case "DMRE_22x48":
    case "DMRE_24x48":
    case "DMRE_24x64":
    case "DMRE_26x40":
    case "DMRE_26x48":
    case "DMRE_26x64":
      _value = data;
      break;
    default:
      throw Exception('Unknown enum value to decode: $data');
  }
}