CometChatMessages class

CometChatMessages is a component that provides a skeleton structure that binds together CometChatMessageHeader, CometChatMessageList, CometChatMessageComposer component. and it also facilitates the communication between these components.

  CometChatMessages(
   user: User(uid: 'uid', name: 'name'),
   group: Group(guid: 'guid', name: 'name', type: 'public'),
   detailsConfiguration: DetailsConfiguration(),
   messageHeaderConfiguration: MessageHeaderConfiguration(),
   messageListConfiguration: MessageListConfiguration(),
   messageComposerConfiguration: MessageComposerConfiguration(),
   threadedMessagesConfiguration: ThreadedMessagesConfiguration(),
   messagesStyle: MessagesStyle(),
 );
Inheritance

Constructors

CometChatMessages.new({Key? key, User? user, Group? group, bool hideMessageComposer = false, MessageListConfiguration messageListConfiguration = const MessageListConfiguration(), MessageHeaderConfiguration messageHeaderConfiguration = const MessageHeaderConfiguration(), MessageComposerConfiguration messageComposerConfiguration = const MessageComposerConfiguration(), bool disableTyping = false, DetailsConfiguration? detailsConfiguration, MessagesStyle? messagesStyle, String? customSoundForIncomingMessages, String? customSoundForIncomingMessagePackage, String? customSoundForOutgoingMessages, String? customSoundForOutgoingMessagePackage, bool? hideMessageHeader, Widget messageComposerView(User? user, Group? group, BuildContext context)?, PreferredSizeWidget messageHeaderView(User? user, Group? group, BuildContext context)?, Widget messageListView(User? user, Group? group, BuildContext context)?, bool? disableSoundForMessages, CometChatTheme? theme, ThreadedMessagesConfiguration? threadedMessagesConfiguration, bool? hideDetails, GlobalKey<State<StatefulWidget>>? messageComposerKey, Widget? auxiliaryHeaderMenu})
const

Properties

auxiliaryHeaderMenu Widget?
auxiliaryHeaderMenu is the place in the CometChatMessageHeader where the calling buttons are shown if the CometChatCallingExtension is enabled
final
customSoundForIncomingMessagePackage String?
customSoundForIncomingMessagePackage is the package name for sound incoming from different package
final
customSoundForIncomingMessages String?
customSoundForIncomingMessages custom sound path for incoming messages
final
customSoundForOutgoingMessagePackage String?
customSoundForOutgoingMessagePackage custom sound path for outgoing messages
final
customSoundForOutgoingMessages String?
customSoundForOutgoingMessages custom sound path for outgoing messages
final
detailsConfiguration DetailsConfiguration?
detailsConfiguration config properties for details module
final
disableSoundForMessages bool?
disableSoundForMessages disable sound for incoming and outgoing message
final
disableTyping bool
disableTyping if true then show typing indicator for composer
final
group Group?
group if not null will CometChatMessages for the group
final
hashCode int
The hash code for this object.
no setterinherited
hideDetails bool?
hideDetails toggle visibility for details icons
final
hideMessageComposer bool
hideMessageComposer hides the composer , default false
final
hideMessageHeader bool?
hideMessageHeader toggle visibility for message header
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
messageComposerConfiguration MessageComposerConfiguration
To set the configuration of message list messageComposerConfiguration is used
final
messageComposerKey GlobalKey<State<StatefulWidget>>?
messageComposerKey key for message composer, We use this to get the dimensions of the composer which we then use to set the placeholder for the composer in stack we are using to show the message list
final
messageComposerView Widget Function(User? user, Group? group, BuildContext context)?
messageComposerView to set custom message composer
final
messageHeaderConfiguration MessageHeaderConfiguration
To set the configuration of message list messageHeaderConfiguration is used
final
messageHeaderView PreferredSizeWidget Function(User? user, Group? group, BuildContext context)?
messageHeaderView to set custom header
final
messageListConfiguration MessageListConfiguration
To set the configuration of message list messageListConfiguration is used
final
messageListView Widget Function(User? user, Group? group, BuildContext context)?
messageListView to set custom message list
final
messagesStyle MessagesStyle?
messagesStyle contains properties that affect the appearance of this widget
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
theme CometChatTheme?
theme custom theme
final
threadedMessagesConfiguration ThreadedMessagesConfiguration?
threadedMessagesConfiguration sets configuration properties for CometChatThreadedMessages
final
user User?
user if not null will CometChatMessages for the user
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<CometChatMessages>
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.
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