ChatFlow class

Entry point to using the ChatFlow.

Inheritance

Constructors

ChatFlow({Key? key, required List<Message> messages, required ChatUser chatUser, OnSendPressed? onSendPressed, void onAttachmentPressed()?, void onMessageLongPressed()?, void onMessageSwipedLeft(Message swipedMessage)?, void onMessageSwipedRight(Message swipedMessage)?, bool? showUserAvatarInChat, void onDeleteMessages(List<Message> messages)?, Theme? theme, CustomWidgetBuilder? videoWidgetBuilder, CustomWidgetBuilder? pdfWidgetBuilder, CustomWidgetBuilder? customWidgetBuilder})
ChatFlow used to add chat features to the app
const

Properties

chatUser ChatUser
The current user of the chat. Ensure the [userID] is unique.
final
customWidgetBuilder CustomWidgetBuilder?
Widget for custom message
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
messages List<Message>
The messages to be shown in the chat
final
onAttachmentPressed → void Function()?
The callback for handling attachment button click.
final
onDeleteMessages → void Function(List<Message> messages)?
Callback to handle the user delete button click after selecting a message
final
onMessageLongPressed → void Function()?
The callback when the user presses down a message for long. By default, the message is selected
final
onMessageSwipedLeft → void Function(Message swipedMessage)?
Callback for when a message is swiped _left
final
onMessageSwipedRight → void Function(Message swipedMessage)?
Callback for when a message is swiped _right
final
onSendPressed OnSendPressed?
The callback to handle the event when a user sends a text message.
final
pdfWidgetBuilder CustomWidgetBuilder?
Widget for displaying pdf files
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showUserAvatarInChat bool?
Set this as true if you want peer user avatar/profile photo to be shown in chat. This is typically used in group chat
final
theme Theme?
Theme for customaziation
final
videoWidgetBuilder CustomWidgetBuilder?
Widget for video message. ChatFlow does not create this widget as we focus on chat management and try to avoid conflicts with your preference
final

Methods

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