CometChatMessageHeader
is a Widget that showcases the User or Group details in the toolbar. Furthermore, it also presents a typing indicator and a back navigation button for ease of use.
CometChatMessageHeader
is comprised of the following components:
Components | Description |
---|---|
ListItem Widget | This component’s widget consists of avatar, status indicator , title, and subtitle. The fields are then mapped with the SDK’s user, group class. |
Back Button | BackButton that allows users to navigate back from the current activity or screen to the previous one |
CometChatMessageHeader
directly using Navigator.push
, or you can define it as a widget within the build
method of your State
class.
CometChatMessageHeader
CometChatMessageHeader
as a Widget in the build MethodonBack
feature. This capability allows you to customize the behavior associated with navigating back within your app. Utilize the provided code snippet to override default behaviors and tailor the user experience according to your specific requirements.
Widget
. You can filter the list based on your specific criteria, allowing for a more customized. Filters can be applied using RequestBuilders
of Chat SDK.
The CometChatMessageHeader
widget does not have any exposed filters.
MessageHeaderStyle
object to the CometChatMessageHeader
widget.
MessageHeaderStyle
are as follows:
Property | Description | Code |
---|---|---|
Back Button Icon Tint | Provides color to back button | backButtonIconTint: Color? |
Background | Background inherited from BaseStyles | background |
Border | Border inherited from BaseStyles | border |
Border Radius | Border radius inherited from BaseStyles | borderRadius |
Gradient | Gradient inherited from BaseStyles | gradient |
Height | Height inherited from BaseStyles | height |
Online Status Color | Sets online status color | onlineStatusColor: Color? |
Subtitle Text Style | Text style for setting subtitle text | subtitleTextStyle: TextStyle? |
Typing Indicator Text Style | Text style for setting typing indicator text | typingIndicatorTextStyle: TextStyle? |
Width | Width inherited from BaseStyles | width |
Avatar
widget within the CometChatMessageHeader
Widget, you can use the following code snippet. For more information you can refer Avatar Styles.
List Item
widget within the CometChatMessageHeader
Widget, you can use the following code snippet. For more information, you can refer ListItem Styles.
Status Indicator
widget within the CometChatMessageHeader
Widget, you can use the following code snippet. For more information you can refer StatusIndicator Styles.
Property | Description | Code |
---|---|---|
Back Button | Widget for the back button | backButton |
Disable Typing | Whether typing indicator is disabled | disableTyping: bool |
Disable User Presence | Whether user presence is disabled | disableUserPresence |
Group | Group object to be displayed | group |
Hide Back Button | Whether to hide the back button | hideBackButton |
Private Group Icon | Icon for private groups | privateGroupIcon |
Protected Group Icon | Icon for protected groups | protectedGroupIcon |
Theme | Theme to be applied | theme |
User | User object to be displayed | user |
CometChatMessageHeader
widget consists of a ListItemView
. You can customize the ListItem according to your requirements by using the .setListItemView
method.
appBarOptions
to the CometChatMessageHeader
widget.
.backButton
method.