ConversationsTrailingView class

A widget that displays the trailing area for a conversation list item.

This widget renders the trailing content which includes:

  • Timestamp showing when the last message was sent/updated
  • Unread message count badge

The widget handles AI user hiding by returning an empty SizedBox when the conversation is with an AI role user.

The trailing view uses:

Inheritance

Constructors

ConversationsTrailingView({Key? key, required Conversation conversation, required CometChatConversationsStyle style, required CometChatDateStyle datesStyle, required CometChatColorPalette colorPalette, required CometChatSpacing spacing, required CometChatTypography typography, String datePattern(Conversation)?, EdgeInsets? datePadding, double? dateHeight, double? dateWidth, bool? dateBackgroundIsTransparent, double? badgeWidth, double? badgeHeight, EdgeInsetsGeometry? badgePadding, DateTimeFormatterCallback? dateTimeFormatterCallback})
const

Properties

badgeHeight double?
Height for the badge widget.
final
badgePadding EdgeInsetsGeometry?
Padding for the badge widget.
final
badgeWidth double?
Width for the badge widget.
final
colorPalette CometChatColorPalette
The color palette used for styling.
final
conversation Conversation
The conversation to display the trailing view for.
final
dateBackgroundIsTransparent bool?
Whether the date background should be transparent.
final
dateHeight double?
Height for the date widget.
final
datePadding EdgeInsets?
Padding for the date widget.
final
datePattern String Function(Conversation)?
Custom date pattern callback for formatting the date. If provided, the returned string will be used as the custom date string.
final
datesStyle CometChatDateStyle
The style configuration for the date widget.
final
dateTimeFormatterCallback DateTimeFormatterCallback?
Callback for custom date/time formatting.
final
dateWidth double?
Width for the date widget.
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
spacing CometChatSpacing
The spacing configuration for padding and margins.
final
style CometChatConversationsStyle
The style configuration for the conversations widget.
final
typography CometChatTypography
The typography configuration for text styles.
final

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
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