encode method
Implementation
@override
String encode() {
Map map = {"duration": this.duration, "extra": this.extra};
if (this.localPath != null) {
map["localPath"] = this.localPath;
} else {
map["localPath"] = "";
}
if (this.remoteUrl != null) {
map["remoteUrl"] = this.remoteUrl;
}
if (this.sendUserInfo != null) {
Map userMap = super.encodeUserInfo(this.sendUserInfo);
map["user"] = userMap;
}
if (this.mentionedInfo != null) {
Map mentionedMap = super.encodeMentionedInfo(this.mentionedInfo);
map["mentionedInfo"] = mentionedMap;
}
if (this.destructDuration != null && this.destructDuration! > 0) {
map["burnDuration"] = this.destructDuration;
}
return json.encode(map);
}