Chat.fromMap constructor
Creates a Chat instance from a Firestore document map
.
Implementation
factory Chat.fromMap(Map<String, dynamic> map) {
return Chat(
chatId: map['chatId'],
customerId: map['customerId'],
nutritionistId: map['nutritionistId'],
lastMessage: map['lastMessage'],
lastMessageTime: DateTime.parse(map['lastMessageTime']),
);
}