toMap method

Map<String, dynamic> toMap()

Implementation

Map<String, dynamic> toMap() {
  Map<String, dynamic> map = {
    "msgType": msgType,
    "content": content,
    "picUrl": picUrl,
    "thumbUrl": thumbUrl,
    "fileUrl": fileUrl,
    "fileNam": fileNam,
    "fileSize": fileSize,
  };
  map.removeWhere((key, value) => value == null);
  return map;
}