MacroCharacter.fromJson constructor

MacroCharacter.fromJson(
  1. dynamic data
)

Creates a MacroCharacter instance from a JSON representation.

Implementation

MacroCharacter.fromJson(dynamic data) {
  switch (data) {
    case "None":
    case "Macro05":
    case "Macro06":
      _value = data;
      break;
    default:
      throw Exception('Unknown enum value to decode: $data');
  }
}