encodeMessage method

Map<String, dynamic> encodeMessage(
  1. Message m
)

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(),
    };