ConversationsSubtitleView class
A widget that displays the subtitle area for a conversation list item.
This widget renders the subtitle content which can include:
- Receipt icons (sent, delivered, read) for messages sent by the logged-in user
- Typing indicator when another user is typing
- Thread indicator (arrow icon) for messages with replies
- Last message text with proper formatting
The widget handles AI user hiding by returning an empty SizedBox when the conversation is with an AI role user.
The subtitle rendering logic follows this priority:
- If the conversation is with an AI user, return empty SizedBox
- If typing indicator is active, show typing text
- Otherwise, show receipt icon (if applicable) and last message
Note: Typing indicators are now managed per-conversation via ValueNotifier in the BLoC for optimized rebuilds. Pass the typing indicators list directly.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- ConversationsSubtitleView
Constructors
-
ConversationsSubtitleView({Key? key, required Conversation conversation, required CometChatConversationsStyle style, required CometChatMessageReceiptStyle receiptStyle, required CometChatTypingIndicatorStyle typingStyle, required CometChatColorPalette colorPalette, required CometChatSpacing spacing, required CometChatTypography typography, List<
TypingIndicator> typingIndicators = const [], bool? hideThreadIndicator = true, bool? receiptsVisibility = true, String? typingIndicatorText, Widget? readIcon, Widget? deliveredIcon, Widget? sentIcon, List<CometChatTextFormatter> ? textFormatters}) -
const
Properties
- colorPalette → CometChatColorPalette
-
The color palette used for styling.
final
- conversation → Conversation
-
The conversation to display the subtitle for.
final
- deliveredIcon → Widget?
-
Custom icon for delivered receipt status.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hideThreadIndicator → bool?
-
Whether to hide the thread indicator arrow icon.
Defaults to true (hidden).
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- readIcon → Widget?
-
Custom icon for read receipt status.
final
- receiptStyle → CometChatMessageReceiptStyle
-
The style configuration for message receipts.
final
- receiptsVisibility → bool?
-
Whether to show receipt icons.
Defaults to true (visible).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sentIcon → Widget?
-
Custom icon for sent receipt status.
final
- spacing → CometChatSpacing
-
The spacing configuration for padding and margins.
final
- style → CometChatConversationsStyle
-
The style configuration for the conversations widget.
final
-
textFormatters
→ List<
CometChatTextFormatter> ? -
List of text formatters for message formatting.
final
-
typingIndicators
→ List<
TypingIndicator> -
The list of typing indicators for this conversation (empty if no one is typing).
final
- typingIndicatorText → String?
-
Custom text to display for typing indicator.
If null, uses default "is typing" text.
final
- typingStyle → CometChatTypingIndicatorStyle
-
The style configuration for typing indicator.
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