watchMessages abstract method

Stream<List<ChatMessage>> watchMessages({
  1. required String chatId,
  2. int limit = 50,
  3. String? startAfterMessageId,
})

Paginated stream of messages for a chat.

  • chatId: ID of the chat
  • limit: Maximum number of messages to return
  • startAfterMessageId: ID of the message to start after (for pagination)

Returns a stream that emits lists of messages ordered from oldest to newest.

Implementation

Stream<List<ChatMessage>> watchMessages({
  required String chatId,
  int limit = 50,
  String? startAfterMessageId,
});