Code128EncodeMode.fromJson constructor

Code128EncodeMode.fromJson(
  1. dynamic data
)

Creates a Code128EncodeMode instance from a JSON representation.

Implementation

Code128EncodeMode.fromJson(dynamic data) {
  switch (data) {
    case "Auto":
    case "CodeA":
    case "CodeB":
    case "CodeAB":
    case "CodeC":
    case "CodeAC":
    case "CodeBC":
      _value = data;
      break;
    default:
      throw Exception('Unknown enum value to decode: $data');
  }
}