MaxiCodeMode.fromJson constructor

MaxiCodeMode.fromJson(
  1. dynamic data
)

Creates a MaxiCodeMode instance from a JSON representation.

Implementation

MaxiCodeMode.fromJson(dynamic data) {
  switch (data) {
    case "Mode2":
    case "Mode3":
    case "Mode4":
    case "Mode5":
    case "Mode6":
      _value = data;
      break;
    default:
      throw Exception('Unknown enum value to decode: $data');
  }
}