fromFireStoreQuery static method
Implementation
static SupportChat fromFireStoreQuery(
QueryDocumentSnapshot<Map<String, dynamic>> doc) {
return SupportChat(
id: doc.id,
requesterEmail: doc.data()['email'],
createTimestamp: doc.data()['create_timestamp'],
lastEditTimestmap: doc.data()['last_edit_timestamp'],
messages: doc
.data()["messages"]
.map(
(m) => SupportChatMessage.fromFireStore(m),
)
.toList(),
state: SupportCaseState.values[doc.data()["state"] ?? 1],
);
}