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, void onMessageLongPressed(Message message)?, void onMessageSwipedLeft(Message swipedMessage)?, void onMessageSwipedRight(Message swipedMessage)?, bool? showUserAvatarInChat, void onMessageSelectionChanged(List<Message> messages)?, Theme? theme, CustomWidgetBuilder? videoWidgetBuilder, CustomWidgetBuilder? pdfWidgetBuilder, CustomWidgetBuilder? customWidgetBuilder, bool? shouldGroupConsecutiveImages, int? minImagesToGroup}) -
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
- minImagesToGroup → int?
-
OptionalBy 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
- onMessageLongPressed → void Function(Message message)?
-
The callback when the user presses down a message for long. By default, the message is selected.
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)?
-
Use this flag to use or prevent default effect of message long press
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
- shouldGroupConsecutiveImages → bool?
-
OptionalDefaults 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, 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