CometChatMessageHeader class
CometChatMessageHeader is a widget which shows user/group details using CometChatListItem
if its being shown for an User then the name of the user will be in the title of CometChatListItem and their online/offline status will be in the subtitleView
if its being shown for an Group then the name of the group will be in the title of CometChatListItem and their member count will be in the subtitleView
CometChatMessageHeader(
user: <user>,
messageHeaderStyle: MessageHeaderStyle(),
);
For Group
CometChatMessageHeader(
group: <group>,
messageHeaderStyle: MessageHeaderStyle(),
);
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- CometChatMessageHeader
- Implemented types
Constructors
-
CometChatMessageHeader({Key? key, WidgetBuilder? backButton, CometChatMessageHeaderStyle? messageHeaderStyle, Group? group, User? user, List<
Widget> ? trailingView(User? user, Group? group, BuildContext context)?, Widget listItemView(Group? group, User? user, BuildContext context)?, bool? showBackButton = true, Widget? subtitleView(Group? group, User? user, BuildContext context)?, ListItemStyle? listItemStyle, VoidCallback? onBack, double? avatarHeight, double? avatarWidth, double? height, EdgeInsetsGeometry? padding, bool? hideVideoCallButton, bool? hideVoiceCallButton, Widget? titleView(Group? group, User? user, BuildContext context)?, Widget? leadingStateView(Group? group, User? user, BuildContext context)?, Widget? auxiliaryButtonView(Group? group, User? user, BuildContext context)?, bool? usersStatusVisibility = true, DateTimeFormatterCallback? dateTimeFormatterCallback, bool? hideNewChatButton, bool? hideChatHistoryButton, VoidCallback? chatHistoryButtonClick, VoidCallback? newChatButtonClick, IconData? newChatIcon, IconData? chatHistoryIcon}) -
const
Properties
- auxiliaryButtonView → Widget? Function(Group? group, User? user, BuildContext context)?
-
auxiliaryButtonView to set auxiliary view
final
- avatarHeight → double?
-
avatarHeight set height for avatar
final
- avatarWidth → double?
-
avatarWidth set width for avatar
final
- backButton → WidgetBuilder?
-
backButton used to set back button widget
final
- chatHistoryButtonClick → VoidCallback?
-
chatHistoryButtonClick callback triggered on chat history button click
final
- chatHistoryIcon → IconData?
-
chatHistoryIcon provides chat history icon
final
- dateTimeFormatterCallback → DateTimeFormatterCallback?
-
dateTimeFormatterCallback is a callback that can be used to format the date and time
final
- group → Group?
-
set Group object, one is mandatory either user or group
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → double?
-
height set height for message header
final
- hideChatHistoryButton → bool?
-
hideChatHistoryButton is a bool that can be used to hide/display chat history button
final
- hideNewChatButton → bool?
-
hideNewChatButton is a bool that can be used to hide/display chat button button
final
- hideVideoCallButton → bool?
-
hideVideoCallButton is a bool that can be used to hide/display video call button
final
- hideVoiceCallButton → bool?
-
hideVoiceCallButton is a bool that can be used to hide/display voice call button
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- leadingStateView → Widget? Function(Group? group, User? user, BuildContext context)?
-
leadingStateView to set leading View
final
- listItemStyle → ListItemStyle?
-
listItemStyle style for every list item
final
- listItemView → Widget Function(Group? group, User? user, BuildContext context)?
-
listItemView set custom view for listItem
final
- messageHeaderStyle → CometChatMessageHeaderStyle?
-
CometChatMessageHeaderStyle set styling props for message header
final
- newChatButtonClick → VoidCallback?
-
newChatButtonClick callback triggered on new chat button click
final
- newChatIcon → IconData?
-
newChatIcon provides new chat icon
final
- onBack → VoidCallback?
-
onBack callback triggered on closing this screen
final
- padding → EdgeInsetsGeometry?
-
padding set padding for message header
final
- preferredSize → Size
-
The size this widget would prefer if it were otherwise unconstrained.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showBackButton → bool?
-
showBackButton toggle visibility for back button
final
- subtitleView → Widget? Function(Group? group, User? user, BuildContext context)?
-
subtitleView to set subtitle view
final
- titleView → Widget? Function(Group? group, User? user, BuildContext context)?
-
titleView to set to set titleView view
final
-
trailingView
→ List<
Widget> ? Function(User? user, Group? group, BuildContext context)? -
trailingView set appbar options
final
- user → User?
-
set User object, one is mandatory either user or group
final
- usersStatusVisibility → bool?
-
usersStatusVisibility controls visibility of status indicator shown if a user is online
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< CometChatMessageHeader> -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited