DataMatrixEncodeMode.fromJson constructor

DataMatrixEncodeMode.fromJson(
  1. dynamic data
)

Creates a DataMatrixEncodeMode instance from a JSON representation.

Implementation

DataMatrixEncodeMode.fromJson(dynamic data) {
  switch (data) {
    case "Auto":
    case "ASCII":
    case "Full":
    case "Custom":
    case "C40":
    case "Text":
    case "EDIFACT":
    case "ANSIX12":
    case "ExtendedCodetext":
      _value = data;
      break;
    default:
      throw Exception('Unknown enum value to decode: $data');
  }
}