toMap method

  1. @override
Map<String, dynamic> toMap()
override

Implementation

@override
Map<String, dynamic> toMap() {
  return {
    "type": "chat",
    "payload": {
      "message": message,
      "userId": userId,
      "chatId": chatId,
      "senderName": senderName,
      "previousMessageUID": previousMessageUID,
      "messageUID": messageUID,
      "sender": sender,
      "title": title,
      "department": department?.toMap()
    }
  };
}