ChatController constructor

ChatController({
  1. required ChatService service,
  2. required String chatId,
  3. required String currentUserId,
})

Creates a new ChatController.

Automatically initializes and starts listening to messages, unread count, and blocked users.

All parameters are required:

  • service: The ChatService implementation to use
  • chatId: ID of the chat
  • currentUserId: ID of the current user

Implementation

ChatController({
  required this.service,
  required this.chatId,
  required this.currentUserId,
}) {
  _initialize();
}