CometChatConversations constructor
CometChatConversations({
- Key? key,
- ConversationsBuilderProtocol? conversationsProtocol,
- Widget? chatAvatar({})?,
- Widget? chatConversationItem({})?,
- Widget? subtitleView()?,
- Widget listItemView()?,
- ConversationsStyle conversationsStyle = const ConversationsStyle(),
- ScrollController? controller,
- CometChatTheme? theme,
- Widget? backButton,
- bool showBackButton = true,
- SelectionMode? selectionMode,
- dynamic onSelection()?,
- String? title = 'Conversations',
- String? errorStateText,
- String? emptyStateText,
- dynamic stateCallBack(
- CometChatConversationsController controller
- ConversationsRequestBuilder? conversationsRequestBuilder,
- bool? hideError,
- WidgetBuilder? loadingStateText,
- WidgetBuilder? emptyStateView,
- WidgetBuilder? errorStateView,
- ListItemStyle? listItemStyle,
- Widget? tailView()?,
- List<
CometChatOption> ? options(- Conversation,
- CometChatConversationsController controller,
- BuildContext context
- AvatarStyle? avatarStyle,
- StatusIndicatorStyle? statusIndicatorStyle,
- BadgeStyle? badgeStyle,
- ReceiptStyle? receiptStyle,
- List<
Widget> ? appBarOptions, - bool? hideSeparator = true,
- bool? disableUsersPresence = false,
- bool? disableReceipt = true,
- bool? hideReceipt = true,
- Widget? protectedGroupIcon,
- Widget? privateGroupIcon,
- Widget? readIcon,
- Widget? deliveredIcon,
- Widget? sentIcon,
- ActivateSelection? activateSelection,
- String datePattern(
- Conversation conversation
- String? customSoundForMessages,
- bool? disableSoundForMessages = false,
- String? typingIndicatorText,
- DateStyle? dateStyle,
- VoidCallback? onBack,
- dynamic onItemTap()?,
- dynamic onItemLongPress()?,
- bool? disableTyping,
- ConfirmDialogStyle? deleteConversationDialogStyle,
- OnError? onError,
- bool? hideAppbar = false,
- bool? disableMentions,
- List<
CometChatTextFormatter> ? textFormatters,
Implementation
CometChatConversations({
super.key,
this.conversationsProtocol,
this.chatAvatar,
this.chatConversationItem,
this.subtitleView,
this.listItemView,
this.conversationsStyle = const ConversationsStyle(),
this.controller,
this.theme,
this.backButton,
this.showBackButton = true,
this.selectionMode,
this.onSelection,
this.title = 'Conversations',
this.errorStateText,
this.emptyStateText,
this.stateCallBack,
this.conversationsRequestBuilder,
this.hideError,
this.loadingStateText,
this.emptyStateView,
this.errorStateView,
this.listItemStyle,
this.tailView,
this.options,
this.avatarStyle,
this.statusIndicatorStyle,
this.badgeStyle,
this.receiptStyle,
this.appBarOptions,
this.hideSeparator = true,
this.disableUsersPresence = false,
this.disableReceipt = true,
this.hideReceipt = true,
this.protectedGroupIcon,
this.privateGroupIcon,
this.readIcon,
this.deliveredIcon,
this.sentIcon,
this.activateSelection,
this.datePattern,
String? customSoundForMessages,
bool? disableSoundForMessages = false,
this.typingIndicatorText,
this.dateStyle,
this.onBack,
this.onItemTap,
this.onItemLongPress,
bool? disableTyping,
ConfirmDialogStyle? deleteConversationDialogStyle,
OnError? onError,
this.hideAppbar = false,
this.disableMentions,
this.textFormatters,
this.navigateToAllGroups,
this.navigateToGroupScreen,
}) : conversationsController = CometChatConversationsController(
conversationsBuilderProtocol: conversationsProtocol ??
UIConversationsBuilder(
conversationsRequestBuilder ?? ConversationsRequestBuilder(),
),
mode: selectionMode,
theme: theme ?? cometChatTheme,
disableSoundForMessages: disableSoundForMessages,
customSoundForMessages: customSoundForMessages,
disableUsersPresence: disableUsersPresence,
disableReceipt: disableReceipt,
hideReceipt: hideReceipt,
disableTyping: disableTyping,
deleteConversationDialogStyle: deleteConversationDialogStyle,
onError: onError,
textFormatters: textFormatters,
disableMentions: disableMentions,
);