CometChatDetails
functions as a standalone widgets designed to establish a screen displaying the details of a specific user or group object. It inherits all properties and methods from the CometChatListBase
class, ensuring comprehensive functionality and customization options.
CometChatDetails
internally implements the following functionalities:
CometChatDetails
functions as a widget, it can be directly launched through a button click or any user-initiated action. Additionally, it can be seamlessly integrated into a tab view controller. CometChatDetails
offers a range of parameters and methods for customizing its user interface.
You can launch CometChatUsersWithMessages
directly using Navigator.push
, or you can define it as a widget within the build
method of your State
class.
CometChatUsersWithMessages
CometChatUsersWithMessages
as a Widget in the build MethodonBack
event is typically triggered when the close button is clicked and it carries a default action. However, with the following code snippet, you can effortlessly override this default operation.
This action does not come with any predefined behavior. However, you have the flexibility to override this event and tailor it to suit your needs using the following code snippet.
onError
, allows users to override error handling within CometChatDetails
, providing greater control over error responses and actions.
CometChatDetails
widgets does not have available filters.
CometChatUserEvents
Events | Description |
---|---|
ccUserBlocked | This will get triggered when the logged in user blocks another user |
ccUserUnblocked | This will get triggered when the logged in user unblocks another user |
DetailsStyle
to the User Detail Widget to customize the styling.
DetailsStyle
Property | Data Type | Description |
---|---|---|
titleStyle | TextStyle? | Provides styling for the title text. |
closeIconTint | Color? | Provides color to the close button. |
privateGroupIconBackground | Color? | Provides background color for the status indicator if the group is private. |
protectedGroupIconBackground | Color? | Provides background color for the status indicator if the group is protected. |
onlineStatusColor | Color? | Sets the color for the online status indicator. |
width | double? | Width of the details widget. |
height | double? | Height of the details widget. |
background | Color? or Gradient? | Background color or gradient of the details widget. |
gradient | Gradient? | Gradient background of the details widget. |
border | Border? | Border of the details widget. |
Avatar
widget in the CometChatDetails
widget, you can use the following code snippet. For further insights on Avatar Styles refer
StatusIndicator
widget in the CometChatDetails
widget, You can use the following code snippet. For further insights on Status Indicator Styles refer
CometChatDetails
widget, You can use the following code snippet. For further insights on List Item Styles refer
CometChatDetailsOption
defines the structure for individual options within the CometChat details widget, facilitating customization and functionality for user interactions.
Property | Data Type | Description |
---|---|---|
customView | Widget? | Custom view widget for the details option. |
tail | Widget? | Tail widget for the details option. |
height | double? | Height of the details option. |
onClick | Function(User? user, Group? group, String section, CometChatDetailsControllerProtocol state)? | Callback function triggered when the details option is clicked. |
id | String | Unique identifier for the details option. |
title | String? | Title of the details option. |
icon | String? | URL or asset name for the icon of the details option. |
packageName | String? | Package name associated with the details option. |
titleStyle | TextStyle? | Text style for the title of the details option. |
CometChatDetailsTemplate
offers a structure for organizing information in the CometChat details widget. It serves as a blueprint, defining how user-related details are presented. This structure allows for customization and organization within the CometChat interface.