Map decodeStringFrame(String str)

input can be String or List

Source

Map decodeStringFrame(String str) {
  if (_reviver == null) {
    _reviver = (key, value) {
      if (value is String && value.startsWith("\u001Bbytes:")) {
        try {
          return ByteDataUtil.fromUint8List(
              Base64.decode(value.substring(7)));
        } catch (err) {
          return null;
        }
      }
      return value;
    };
  }

  if (_unsafeDecoder == null) {
    _unsafeDecoder = new JsonDecoder(_reviver);
  }

  var result = _unsafeDecoder.convert(str);
  return result;
}