ConversationsConfiguration class
ConversationsConfiguration is a data class that has configuration properties to customize the functionality and appearance of CometChatConversations can be used by a component where CometChatConversations is a child component {@tool snippet}
ConversationsConfiguration(
avatarStyle: AvatarStyle(),
dateStyle: DateStyle(),
badgeStyle: BadgeStyle(),
conversationsStyle: ConversationsStyle(),
receiptStyle: ReceiptStyle(),
listItemStyle: ListItemStyle(),
statusIndicatorStyle: StatusIndicatorStyle(),
deleteConversationDialogStyle: ConfirmDialogStyle(),
)
{@end-tool}
Constructors
-
ConversationsConfiguration({ConversationsRequestBuilder? conversationsRequestBuilder, ConversationTypes conversationType = ConversationTypes.both, Widget? chatAvatar({String? name, required bool online, Color? rimColor, double? size, required String url})?, Widget? chatConversationItem({required String avatarName, String? avatarUrl, bool? isGroupChat, String? lastAction, bool? online, String? subtitle, DateTime? time, required String title, int? unreadCount})?, Widget? subtitleView(BuildContext, Conversation)?, String? title, bool showBackButton = true, Widget? backButton, bool hideStartConversation = false, Icon? startConversationIcon, CometChatTheme? theme, Widget? tailView(Conversation)?, bool? hideSeparator, Widget listItemView(Conversation)?, ConversationsStyle? conversationsStyle, List<
CometChatOption> ? options(Conversation, CometChatConversationsController controller, BuildContext context)?, SelectionMode? selectionMode, dynamic onSelection(List<Conversation> ?)?, String? emptyStateText, String? errorStateText, WidgetBuilder? loadingStateText, WidgetBuilder? emptyStateView, WidgetBuilder? errorStateView, dynamic stateCallBack(CometChatConversationsController controller)?, ListItemStyle? listItemStyle, AvatarStyle? avatarStyle, StatusIndicatorStyle? statusIndicatorStyle, ReceiptStyle? receiptStyle, bool? disableUsersPresence, bool? disableReceipt, bool? hideReceipt, Widget? protectedGroupIcon, Widget? privateGroupIcon, Widget? readIcon, Widget? deliveredIcon, Widget? sentIcon, String datePattern(Conversation conversation)?, String? typingIndicatorText, DateStyle? dateStyle, BadgeStyle? badgeStyle, String? customSoundForMessages, bool? disableSoundForMessages, ConversationsBuilderProtocol? conversationsProtocol, bool? hideError, List<Widget> ? appBarOptions, ActivateSelection? activateSelection, ScrollController? controller, OnError? onError, VoidCallback? onBack, dynamic onItemTap(Conversation)?, dynamic onItemLongPress(Conversation)?, bool? disableTyping, ConfirmDialogStyle? deleteConversationDialogStyle, bool? hideAppbar, bool? disableMentions, List<CometChatTextFormatter> ? textFormatters}) -
const
Properties
- activateSelection → ActivateSelection?
-
activateSelection lets the widget know if conversations are allowed to be selected
final
-
appBarOptions
→ List<
Widget> ? -
appBarOptions list of options to be visible in app bar
final
- avatarStyle → AvatarStyle?
-
avatarStyle set style for avatar
final
- backButton → Widget?
-
backButton back button
final
- badgeStyle → BadgeStyle?
-
badgeStyle used to customize the unread messages count indicator
final
- chatAvatar → Widget? Function({String? name, required bool online, Color? rimColor, double? size, required String url})?
-
CUSTOM WIDGETS
final
- chatConversationItem → Widget? Function({required String avatarName, String? avatarUrl, bool? isGroupChat, String? lastAction, bool? online, String? subtitle, DateTime? time, required String title, int? unreadCount})?
-
final
- controller → ScrollController?
-
controller sets controller for the list
final
- conversationsProtocol → ConversationsBuilderProtocol?
-
conversationsProtocol set custom conversations request builder protocol
final
- conversationsRequestBuilder → ConversationsRequestBuilder?
-
conversationsRequestBuilder set custom conversations request builder
final
- conversationsStyle → ConversationsStyle?
-
conversationsStyle sets style
final
- conversationType → ConversationTypes
-
conversationType conversation type user/group/both
final
- customSoundForMessages → String?
-
customSoundForMessages URL of the audio file to be played upon receiving messages
final
- datePattern → String Function(Conversation conversation)?
-
datePattern is used to generate customDateString for CometChatDate
final
- dateStyle → DateStyle?
-
dateStyle provides styling for CometChatDate
final
- deleteConversationDialogStyle → ConfirmDialogStyle?
-
deleteConversationDialogStyle provides customization for the dialog box that pops up when tapping the delete conversation option
final
- deliveredIcon → Widget?
-
deliveredIcon provides icon in read receipts if a message is delivered
final
- disableMentions → bool?
-
disableMentions disables formatting of mentions in the subtitle of the conversation
final
- disableReceipt → bool?
-
disableReceipt controls visibility of read receipts
final
- disableSoundForMessages → bool?
-
disableSoundForMessages if true will disable sound for messages
final
- disableTyping → bool?
-
disableTyping if true stops indicating if a participant in a conversation is typing
final
- disableUsersPresence → bool?
-
disableUsersPresence controls visibility of status indicator shown if a user is online
final
- emptyStateText → String?
-
emptyStateText text to be displayed when the list is empty
final
- emptyStateView → WidgetBuilder?
-
emptyStateView returns view fow empty state
final
- errorStateText → String?
-
errorStateText text to be displayed when error occur
final
- errorStateView → WidgetBuilder?
-
errorStateView returns view fow error state behind the dialog
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hideAppbar → bool?
-
hideAppbar toggle visibility for app bar
final
- hideError → bool?
-
hideError toggle visibility of error dialog
final
- hideReceipt → bool?
-
hideReceipt controls visibility of read receipts
final
- hideSeparator → bool?
-
hideSeparator toggle visibility of separator
final
- hideStartConversation → bool
-
hideStartConversation if true then hides start conversation icon
final
- listItemStyle → ListItemStyle?
-
listItemStyle style for every list item
final
- listItemView → Widget Function(Conversation)?
-
listItemView set custom view for each conversation
final
- loadingStateText → WidgetBuilder?
-
loadingStateText returns view fow loading state
final
-
final
-
final
- onBack → VoidCallback?
-
onBack callback triggered on closing this screen
final
- onError → OnError?
-
onError callback triggered in case any error happens when fetching conversations
final
- onItemLongPress → dynamic Function(Conversation)?
-
onItemLongPress callback triggered on pressing for long on a conversation item
final
- onItemTap → dynamic Function(Conversation)?
-
onItemTap callback triggered on tapping a conversation item
final
-
onSelection
→ dynamic Function(List<
Conversation> ?)? -
onSelection function will be performed
final
-
options
→ List<
CometChatOption> ? Function(Conversation, CometChatConversationsController controller, BuildContext context)? -
final
- privateGroupIcon → Widget?
-
privateGroupIcon provides icon in status indicator for private group
final
- protectedGroupIcon → Widget?
-
protectedGroupIcon provides icon in status indicator for protected group
final
- readIcon → Widget?
-
readIcon provides icon in read receipts if a message is read
final
- receiptStyle → ReceiptStyle?
-
receiptStyle sets the style for the receipts shown in the subtitle
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectionMode → SelectionMode?
-
selectionMode specifies mode conversations module is opening in
final
- sentIcon → Widget?
-
sentIcon provides icon in read receipts if a message is sent
final
- showBackButton → bool
-
showBackButton switch on/off back button
final
- startConversationIcon → Icon?
-
startConversationIcon start conversation icon
final
- stateCallBack → dynamic Function(CometChatConversationsController controller)?
-
stateCallBack to access controller functions from parent pass empty reference of CometChatConversationsController object
final
- statusIndicatorStyle → StatusIndicatorStyle?
-
statusIndicatorStyle set style for status indicator
final
- subtitleView → Widget? Function(BuildContext, Conversation)?
-
subtitleView to set subtitle for each conversation
final
- tailView → Widget? Function(Conversation)?
-
tailView to set tailView for each conversation
final
-
textFormatters
→ List<
CometChatTextFormatter> ? -
textFormatters is a list of text formatters for message bubbles with type text
final
- theme → CometChatTheme?
-
theme can pass custom theme
final
- title → String?
-
title sets title for the list
final
- typingIndicatorText → String?
-
typingIndicatorText if not null is visible instead of default text shown when another user is typing
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited