StreamMessageComposerReplyAttachment class

A composer attachment that previews the message being replied to.

StreamMessageComposerReplyAttachment displays a leading indicator bar, a title (typically the quoted user's name), a subtitle (a preview of the quoted message body), and an optional trailing thumbnail of the quoted attachment. Both labels render on a single line and ellipsize on overflow.

direction selects direction-aware default colors: incoming previews use a neutral surface tint with a chrome indicator, outgoing previews use a brand-tinted background with a brand indicator.

The preview fills the parent's width and is at least 56 tall, growing vertically to fit longer content.

{@tool snippet}

A reply preview for an outgoing message:

StreamMessageComposerReplyAttachment(
  title: Text('Reply to John Doe'),
  subtitle: Text('We had a great time during our holiday.'),
  direction: StreamReplyDirection.outgoing,
  onRemovePressed: () => cancelReply(),
)

{@end-tool}

Theming

StreamMessageComposerReplyAttachment uses StreamMessageComposerReplyAttachmentThemeData for default styling, falling back to direction-aware defaults selected by direction. Per-instance style takes precedence over the inherited theme.

See also:

Inheritance

Constructors

StreamMessageComposerReplyAttachment({Key? key, required Widget title, required Widget subtitle, Widget? thumbnail, VoidCallback? onRemovePressed, StreamReplyDirection direction = .incoming, StreamMessageComposerReplyAttachmentThemeData? style})
Creates a reply preview attachment.

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 → StreamMessageComposerReplyAttachmentProps
The properties that configure this reply preview.
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