DotCodeEncodeMode.fromJson constructor

DotCodeEncodeMode.fromJson(
  1. dynamic data
)

Creates a DotCodeEncodeMode instance from a JSON representation.

Implementation

DotCodeEncodeMode.fromJson(dynamic data) {
  switch (data) {
    case "Auto":
    case "Bytes":
    case "ExtendedCodetext":
      _value = data;
      break;
    default:
      throw Exception('Unknown enum value to decode: $data');
  }
}