SimpleTextMessage class

A widget that displays a simple text message.

Inheritance

Constructors

SimpleTextMessage({Key? key, required TextMessage message, required int index, EdgeInsetsGeometry? padding = const EdgeInsets.symmetric(horizontal: 16, vertical: 10), BorderRadiusGeometry? borderRadius, BoxConstraints? constraints, double? onlyEmojiFontSize = 48, Color? sentBackgroundColor, Color? receivedBackgroundColor, TextStyle? sentTextStyle, TextStyle? receivedTextStyle, TextStyle? timeStyle, bool showTime = true, bool showStatus = true, TimeAndStatusPosition timeAndStatusPosition = TimeAndStatusPosition.end, EdgeInsetsGeometry? timeAndStatusPositionInlineInsets = const EdgeInsets.only(bottom: 2), LinkPreviewPosition linkPreviewPosition = LinkPreviewPosition.bottom})
Creates a widget to display a simple text message.
const

Properties

borderRadius → BorderRadiusGeometry?
Border radius of the message bubble.
final
constraints → BoxConstraints?
Box constraints for the message bubble.
final
hashCode → int
The hash code for this object.
no setterinherited
index → int
The index of the message in the list.
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
linkPreviewPosition → LinkPreviewPosition
The position of the link preview widget relative to the text. If set to LinkPreviewPosition.none, the link preview widget will not be displayed. A LinkPreviewBuilder must be provided for the preview to be displayed.
final
message → TextMessage
The text message data model.
final
onlyEmojiFontSize → double?
Font size for messages containing only emojis.
final
padding → EdgeInsetsGeometry?
Padding around the message bubble content.
final
receivedBackgroundColor → Color?
Background color for messages received from other users.
final
receivedTextStyle → TextStyle?
Text style for messages received from other users.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sentBackgroundColor → Color?
Background color for messages sent by the current user.
final
sentTextStyle → TextStyle?
Text style for messages sent by the current user.
final
showStatus → bool
Whether to display the message status (sent, delivered, seen) for sent messages.
final
showTime → bool
Whether to display the message timestamp.
final
timeAndStatusPosition → TimeAndStatusPosition
Position of the timestamp and status indicator relative to the text.
final
timeAndStatusPositionInlineInsets → EdgeInsetsGeometry?
Insets for the timestamp and status indicator when timeAndStatusPosition is TimeAndStatusPosition.inline.
final
timeStyle → TextStyle?
Text style for the message timestamp and status.
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