StreamMessageReplies class
A tappable row showing reply count, participant avatars, and an optional connector for threaded messages.
Displays an optional label (typically a reply count), a list of
participant avatars, and an optional connector linking the row to the
parent message bubble.
The visual order of elements is controlled by alignment:
- StreamMessageAlignment.start:
[connector, avatars, label] - StreamMessageAlignment.end:
[label, avatars, connector]
When showConnector is true, a connector is displayed that visually
links the row to the message bubble above. The connector adapts to
alignment and the ambient TextDirection.
RTL support comes from the ambient TextDirection automatically — the alignment only controls the semantic order, not the physical direction.
{@tool snippet}
Incoming message with replies:
StreamMessageReplies(
label: Text('3 replies'),
avatars: [
StreamAvatar(placeholder: (context) => Text('A')),
StreamAvatar(placeholder: (context) => Text('B')),
],
showConnector: true,
onTap: () => openThread(),
)
{@end-tool}
{@tool snippet}
Outgoing message with replies (end alignment):
StreamMessageReplies(
label: Text('5 replies'),
avatars: [
StreamAvatar(placeholder: (context) => Text('A')),
],
showConnector: true,
alignment: StreamMessageAlignment.end,
onTap: () => openThread(),
)
{@end-tool}
See also:
- StreamMessageRepliesStyle, for customizing replies appearance.
- StreamMessageItemTheme, for theming via the widget tree.
- StreamMessageAlignment, for controlling element order.
- StreamAvatarStack, which renders the avatars internally.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- StreamMessageReplies
Constructors
-
StreamMessageReplies({Key? key, Widget? label, Iterable<
Widget> ? avatars, StreamAvatarStackSize avatarSize = .sm, int maxAvatars = 3, bool showConnector = true, VoidCallback? onTap, VoidCallback? onLongPress, StreamMessageAlignment? alignment, Clip? clipBehavior, StreamMessageRepliesStyle? style}) - Creates a message replies row.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- props → StreamMessageRepliesProps
-
The properties that configure this replies row.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
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