HanXinEncodeMode.fromJson constructor

HanXinEncodeMode.fromJson(
  1. dynamic data
)

Creates a HanXinEncodeMode instance from a JSON representation.

Implementation

HanXinEncodeMode.fromJson(dynamic data) {
  switch (data) {
    case "Auto":
    case "Binary":
    case "ECI":
    case "Unicode":
    case "URI":
    case "Extended":
      _value = data;
      break;
    default:
      throw Exception('Unknown enum value to decode: $data');
  }
}