MessageWidget class

screenshot screenshot

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.

Inheritance

Constructors

MessageWidget({Key key, @required Message previousMessage, @required Message message, @required Message nextMessage, void onThreadTap(Message), void onUserAvatarTap(User), dynamic onMessageActions(BuildContext, Message), bool isParent: false, void onMentionTap(User), bool showOtherMessageUsername: false, bool showVideoFullScreen: true})
const

Properties

hashCode int
The hash code for this object. [...]
@nonVirtual, read-only, inherited
isParent bool
True if this is the parent of the thread being showed
final
key Key
Controls how one widget replaces another widget in the tree. [...]
final, inherited
message Message
This message
final
nextMessage Message
The next message
final
onMentionTap → void Function(User)
Function called on mention tap
final
onMessageActions → dynamic Function(BuildContext, Message)
Function called on long press
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
previousMessage Message
The previous message
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
showOtherMessageUsername bool
If true show the other users username next to the timestamp of the message
final
showVideoFullScreen bool
True if the video player will allow fullscreen mode
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. [...]
override
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