decode method

  1. @override
void decode(
  1. String? jsonStr
)
override

Implementation

@override
void decode(String? jsonStr) {
  if (jsonStr == null || jsonStr == "") {
    developer.log("Flutter FileMessage deocde error: no content", name: "RongIMClient.FileMessage");
    return;
  }
  Map map = json.decode(jsonStr);
  this.mName = map["name"];
  this.mType = map["type"];
  this.mSize = map["size"];
  this.localPath = map["localPath"];
  this.extra = map["extra"];
  this.mMediaUrl = map["fileUrl"];
  Map? userMap = map["user"];
  super.decodeUserInfo(userMap);
  Map? menthionedMap = map["mentionedInfo"];
  super.decodeMentionedInfo(menthionedMap);
  // this.destructDuration = map["burnDuration"];
}