QREncodeMode.fromJson constructor

QREncodeMode.fromJson(
  1. dynamic data
)

Creates a QREncodeMode instance from a JSON representation.

Implementation

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