CometChatMessagePreview class

CometChatMessagePreview is a component that provides a bubble consisting of text that can be appended to the message composer, message bubble or any other component as desired. The appearance is similar to a quote block of markdown files.

Inheritance

Constructors

CometChatMessagePreview({Key? key, required String messagePreviewTitle, required String messagePreviewSubtitle, Icon? messagePreviewCloseButtonIcon, CometChatMessagePreviewStyle? messagePreviewStyle, dynamic onCloseClick()?, bool hideCloseButton = false, BaseMessage? message, String? stickerUrl, Widget? subtitleWidget})
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
hideCloseButton → bool
hideCloseButton hides the close button when true
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
message → BaseMessage?
message message object used to show a media type icon for non-text messages
final
messagePreviewCloseButtonIcon → Icon?
messagePreviewCloseButtonIcon replaces the default close icon
final
messagePreviewStyle → CometChatMessagePreviewStyle?
messagePreviewStyle alters styling properties
final
messagePreviewSubtitle → String
messagePreviewSubtitle subtitle shown in the preview bar (message text or type label)
final
messagePreviewTitle → String
messagePreviewTitle title shown in the preview bar (e.g. sender name or "Edit Message")
final
onCloseClick → dynamic Function()?
onCloseClick callback invoked when the close button is tapped
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
stickerUrl → String?
stickerUrl URL of a sticker image to show as a thumbnail in the preview
final
subtitleWidget → Widget?
subtitleWidget optional custom widget for the subtitle area. When provided, takes precedence over messagePreviewSubtitle string.
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