chat_ui/src/groups/groups library

Barrel export for groups module with Clean Architecture

This file provides a single import point for all groups module components. Import this file to access all groups-related functionality.

Migration from GetX to BLoC

The groups module has been migrated from GetX to Clean Architecture with BLoC.

  • New: Use GroupsBloc for state management
  • Deprecated: CometChatGroupsController (GetX-based) - will be removed in future

Example using the new BLoC pattern:

CometChatGroups(
  groupsBloc: GroupsBloc(),
);

Classes

AddGroup
Add a new group to the list
ClearGroupSelection
Clear all group selections
CometChatGroupListItem
CometChatGroupListItem is a dedicated widget for displaying a single group list item.
CometChatGroupListItemStyle
Style configuration for CometChatGroupListItem.
CometChatGroups
CometChatGroups is a component that displays a list of groups available in the app using Clean Architecture with BLoC pattern.
CometChatGroupsStyle
CometChatGroupsStyle is a data class that has styling-related properties to customize the appearance of CometChatGroups
ConnectionRestored
Event triggered when connection is restored This is an internal event dispatched by connection listeners
GetGroupsUseCase
Use case for getting groups with pagination and search support
GetLoggedInUserUseCase
Use case for getting the currently logged-in user
GroupCreated
Event triggered when a new group is created This is an internal event dispatched by SDK listeners
GroupMemberBanned
Event triggered when a member is banned from a group This is an internal event dispatched by SDK listeners
GroupMemberJoined
Event triggered when a member joins a group This is an internal event dispatched by SDK listeners
GroupMemberKicked
Event triggered when a member is kicked from a group This is an internal event dispatched by SDK listeners
GroupMemberLeft
Event triggered when a member leaves a group This is an internal event dispatched by SDK listeners
GroupMemberScopeChanged
Event triggered when a member's scope changes in a group This is an internal event dispatched by SDK listeners
GroupMemberUnbanned
Event triggered when a member is unbanned from a group This is an internal event dispatched by SDK listeners
GroupOwnershipTransferred
Event triggered when group ownership is transferred This is an internal event dispatched by SDK listeners
GroupsBloc
BLoC for managing groups list
GroupsBuilderProtocol
GroupsBuilderProtocol is an interface that defines the structure for fetching the groups. It provides a generic requestBuilder property and methods getRequest and getSearchRequest that needs to be overridden.
GroupsEmpty
Empty state when no groups exist
GroupsError
Error state with error message and optional previous data
GroupsEvent
Base class for all groups events Uses Equatable for proper event comparison in BLoC
GroupsInitial
Initial state before any data is loaded
GroupsList
A widget that displays the list of groups with state handling and pagination.
GroupsLoaded
Loaded state with group data
GroupsLoading
Loading state when fetching initial groups
GroupsRemoteDataSource
Abstract interface for groups remote data source Handles all interactions with CometChat SDK for groups
GroupsRemoteDataSourceImpl
Implementation of GroupsRemoteDataSource using CometChat SDK
GroupsRepository
Repository interface for groups data operations Defines the contract for group data access
GroupsRepositoryImpl
Implementation of GroupsRepository Coordinates between remote data source and domain layer
GroupsServiceLocator
Service locator for Groups module dependency injection
GroupsState
Base class for groups states Uses Equatable for proper state comparison in BLoC
InitializeLoggedInUser
Internal event for initializing logged-in user This is used internally by the BLoC and should not be dispatched externally
JoinGroupUseCase
Use case for joining a group
LeaveGroupUseCase
Use case for leaving a group
LoadGroups
Load initial groups
LoadMoreGroups
Load more groups (pagination)
LoadMoreGroupsUseCase
Use case for loading more groups with pagination support
RefreshGroups
Refresh groups list
RemoveGroup
Remove a group from the list
SearchGroups
Search groups by keyword
ToggleGroupSelection
Toggle group selection
UIGroupsBuilder
UIGroupsBuilder is the default GroupsBuilderProtocol used when a custom builder protocol is not passed
UpdateGroup
Update a specific group

Exceptions / Errors

GroupsRemoteDataSourceException
Exception thrown when remote data source operations fail