AI Integration Quick Reference
AI Integration Quick Reference
Configuring Data Fetching with RequestBuilders
Use request builders to control what data the component fetches. Pass the builder instance — not the result of.build().
- Dart
Request Builder by Component
Providing a Custom BLoC
Each component accepts an optional BLoC parameter. Provide your own instance to override default behavior:- Dart
BLoC Parameters by Component
Extending the Default BLoC
Extend the default BLoC class and override hooks to add custom behavior:- Dart
ListBase Hooks
All list-based BLoCs use theListBase mixin with these override hooks:
Component-Specific BLoC Events
Each component’s BLoC has its own events and methods. See the individual component docs for details:- Message List — BLoC Events & Methods
- Conversations — BLoC Events
- Users — BLoC Events
- Groups — BLoC Events
- Group Members — BLoC Events
Lifecycle Callbacks
- Dart
Related
- Message List — Full message list component reference.
- Customization Overview — See all customization categories.
Repository & Datasource Overrides
BothCometChatConversations and CometChatMessageList follow the same clean architecture stack. There are two override points:
1. Datasource Override
Implement the abstract datasource interfaces to swap the data layer entirely — e.g. a REST API instead of the CometChat SDK, or a persistent cache instead of in-memory.Conversations
- Dart
Message List
- Dart
2. Repository Override
The repository interfaces sit above the datasources. Override here to change business logic — caching strategy, error handling, retry logic — without touching the datasource layer.Conversations
- Dart
Message List
- Dart
3. Wiring via the Service Locator
The service locators are the injection point. Both are singletons with asetup() method. Call reset() first, then setup() with your custom implementations before the widget mounts.
Datasource-level override (Conversations)
- Dart
Repository-level override (Message List)
- Dart