CodabarChecksumMode.fromJson constructor

CodabarChecksumMode.fromJson(
  1. dynamic data
)

Creates a CodabarChecksumMode instance from a JSON representation.

Implementation

CodabarChecksumMode.fromJson(dynamic data) {
  switch (data) {
    case "Mod10":
    case "Mod16":
      _value = data;
      break;
    default:
      throw Exception('Unknown enum value to decode: $data');
  }
}