toJson method
Converts to JSON encodable Map
Implementation
@override
Map<String, dynamic> toJson() {
return {
'type': type.value,
'date': date,
'chat': chat.toJson(),
'message_id': messageId,
'author_signature': authorSignature,
}..removeWhere(_nullFilter);
}