toJson method Null safety

Map toJson()

Implementation

Map toJson() {
  return {
    'id': id,
    'serverMessageId': serverMessageId,
    'isSend': isSend,
    'from': from.toJson(),
    'createTime': createTime,
    'extras': extras,
    'target': target.toJson()
  };
}