encodeMessage method
Override to use your own Message ↔ JSON codec.
Implementation
Map<String, dynamic> encodeMessage(Message m) => {
'id': m.id,
'conversationId': m.conversationId,
'authorId': m.authorId,
'type': m.type,
'createdAt': m.createdAt.toIso8601String(),
};