HanXinErrorLevel.fromJson constructor

HanXinErrorLevel.fromJson(
  1. dynamic data
)

Implementation

HanXinErrorLevel.fromJson(dynamic data) {
  switch (data) {
    case "L1":
      value = data;
      break;
    case "L2":
      value = data;
      break;
    case "L3":
      value = data;
      break;
    case "L4":
      value = data;
      break;
    default:
      throw Exception('Unknown enum value to decode: $data');
  }
}