toMap method
Implementation
Map<String, dynamic> toMap() {
int ms = createdAt.millisecondsSinceEpoch;
double sec = ms / 1000;
return {
'id': id,
'messageId': messageId,
'title': title,
'details': details,
'imageUrl': imageUrl,
'data': data,
'status': status,
'createdAt': sec,
'objectId': objectId,
};
}