toMap method
Converts this message to a JSONācompatible map.
Implementation
Map<String, dynamic> toMap() {
return {
_keyText: text,
_keyChatMedia: chatMedia?.toMap(),
_keyIsSender: isSender,
_keyCreatedAt: createdAt?.millisecondsSinceEpoch,
};
}