ChatFlow class
Entry point to using the ChatFlow.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- ChatFlow
Constructors
-
ChatFlow({Key? key, required List<
Message> messages, required ChatUser chatUser, OnSendPressed? onSendPressed, OnAttachmentPressed? onAttachmentPressed, OnMessageGesture? onMessageLongPressed, OnMessageGesture? onMessageDoubleTapped, OnMessageGesture? onImageMessageTapped, void onMessageSwipedLeft(Message swipedMessage)?, void onMessageSwipedRight(Message swipedMessage)?, OnMessageGesture? onReplyToMessage, bool? showUserAvatarInChat, void onMessageSelectionChanged(List<Message> messages)?, Theme? theme, CustomWidgetBuilder? videoWidgetBuilder, CustomWidgetBuilder? pdfWidgetBuilder, CustomWidgetBuilder? customWidgetBuilder, CustomWidgetBuilder? audioWidgetBuilder, CustomWidgetBuilder? docWidgetBuilder, bool? shouldGroupConsecutiveImages, int? minImagesToGroup, bool? hideDefaultInputWidget = false}) - ChatFlow used to add chat features to the app
Properties
- audioWidgetBuilder → CustomWidgetBuilder?
-
Widget for displaying audio files
final
- chatUser → ChatUser
-
The current user of the chat. Ensure the
[userID]
is unique.final - customWidgetBuilder → CustomWidgetBuilder?
-
Widget for custom message
final
- docWidgetBuilder → CustomWidgetBuilder?
-
Widget for displaying doc files
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hideDefaultInputWidget → bool?
-
Option for hiding ChatFlow default input widget.
final
- 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
- minImagesToGroup → int?
-
Optional
By the default, if consecutive images are upto 4 or more by the same author and on the same day, these images would be grouped.final - onAttachmentPressed → OnAttachmentPressed?
-
The callback for handling attachment button click.
final
- onImageMessageTapped → OnMessageGesture?
-
Callback for image message tapped
final
- onMessageDoubleTapped → OnMessageGesture?
-
The callback when the user presses down a message for long. By default, the message is selected.
final
- onMessageLongPressed → OnMessageGesture?
-
The callback when the user presses down a message for long.
final
-
onMessageSelectionChanged
→ void Function(List<
Message> messages)? -
Callback to handle the user delete button click after selecting a message
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
- onReplyToMessage → OnMessageGesture?
-
The callback to handle when a message is gestured to be replied to. By default, when a user swipes his/her message left or when a user swipes other person's message right we chain a replyTo event to such a gesture. To override such swipe behaviour or to even intercept it and add custom action together with the default pass in the
onReplyToMessage
callback and you will have access to the gestured message.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
- shouldGroupConsecutiveImages → bool?
-
Optional
Defaults to true. If you don't want to group consecutive images just make it falsefinal - 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}) → 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