MessageWidget class
It shows a message with reactions, replies and user avatar.
Usually you don't use this widget as it's the default message widget used by MessageListView.
The widget components render the ui based on the first ancestor of type StreamChatTheme. Modify it to change the widget appearance.
Constructors
-
MessageWidget({Key key, @required Message message, @required MessageTheme messageTheme, void onMessageTap(Message), bool reverse = false, ShapeBorder shape, ShapeBorder attachmentShape, BorderSide borderSide, BorderSide attachmentBorderSide, BorderRadiusGeometry borderRadiusGeometry, BorderRadiusGeometry attachmentBorderRadiusGeometry, void onMentionTap(User), DisplayWidget showUserAvatar = DisplayWidget.show, DisplayWidget showSendingIndicator = DisplayWidget.show, bool showReplyIndicator = true, void onThreadTap(Message), bool showUsername = true, bool showTimestamp = true, bool showReactions = true, bool showDeleteMessage = true, bool showEditMessage = true, void onUserAvatarTap(User), void onLinkTap(String), void onMessageActions(BuildContext, Message), Widget editMessageInputBuilder(BuildContext, Message), Widget textBuilder(BuildContext, Message), Map<
String, AttachmentBuilder> customAttachmentBuilders, List<Read> readList, EdgeInsetsGeometry padding, EdgeInsetsGeometry textPadding = const EdgeInsets.all(8.0), EdgeInsetsGeometry attachmentPadding = EdgeInsets.zero})
Properties
- attachmentBorderRadiusGeometry → BorderRadiusGeometry
-
The border radius of an attachment
final
- attachmentBorderSide → BorderSide
-
The borderside of an attachment
final
-
attachmentBuilders
→ Map<
String, AttachmentBuilder> -
final
- attachmentPadding → EdgeInsetsGeometry
-
The internal padding of an attachment
final
- attachmentShape → ShapeBorder
-
The shape of an attachment
final
- borderRadiusGeometry → BorderRadiusGeometry
-
The border radius of the message text
final
- borderSide → BorderSide
-
The borderside of the message text
final
- editMessageInputBuilder → Widget Function(BuildContext, Message)
-
The builder of MessageInput used while editing this message
final
- hashCode → int
-
The hash code for this object. [...]
@nonVirtual, read-only, inherited
- key → Key
-
Controls how one widget replaces another widget in the tree. [...]
final, inherited
- message → Message
-
The message
final
- messageTheme → MessageTheme
-
The message theme
final
- onLinkTap → void Function(String)
-
The function called when tapping on a link
final
- onMentionTap → void Function(User)
-
Function called on mention tap
final
- onMessageActions → void Function(BuildContext, Message)
-
Function called on long press
final
- onMessageTap → void Function(Message)
-
The function called when tapping on the message when the message is not failed
final
- onThreadTap → void Function(Message)
-
The function called when tapping on replies
final
- onUserAvatarTap → void Function(User)
-
The function called when tapping on UserAvatar
final
- padding → EdgeInsetsGeometry
-
The padding of the widget
final
-
readList
→ List<
Read> -
final
- reverse → bool
-
If true the widget will be mirrored
final
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
- shape → ShapeBorder
-
The shape of the message text
final
- showDeleteMessage → bool
-
final
- showEditMessage → bool
-
final
- showReactions → bool
-
If true the widget will show the reactions
final
- showReplyIndicator → bool
-
If true the widget will show the reply indicator
final
- showSendingIndicator → DisplayWidget
-
It controls the display behaviour of the sending indicator
final
- showTimestamp → bool
-
final
- showUserAvatar → DisplayWidget
-
It controls the display behaviour of the user avatar
final
- showUsername → bool
-
If true show the users username next to the timestamp of the message
final
- textBuilder → Widget Function(BuildContext, Message)
-
The builder of the text of the message
final
- textPadding → EdgeInsetsGeometry
-
The internal padding of the message text
final
Methods
-
createElement(
) → StatefulElement -
Creates a
StatefulElement
to manage this widget's location in the tree. [...]inherited -
createState(
) → _MessageWidgetState - Creates the mutable state for this widget at a given location in the tree. [...]
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of
DiagnosticsNode
objects describing this node's children. [...]@protected, inherited -
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node. [...]
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent 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 -
Returns a string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) → 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. [...]
@nonVirtual, inherited