ChatMessage.fromMap constructor
Implementation
factory ChatMessage.fromMap(Map<String, dynamic> map) {
return ChatMessage(
text: map['text'] as String,
chatMedia: map['chatMedia'] != null
? ChatMedia.fromMap(map['chatMedia'] as Map<String, dynamic>)
: null,
isSender: map['isSender'] as bool,
createdAt: map['createdAt'] != null
? DateTime.fromMillisecondsSinceEpoch(map['createdAt'] as int)
: null,
);
}