CometChatConversations constructor

CometChatConversations({
  1. Key? key,
  2. ConversationsBuilderProtocol? conversationsProtocol,
  3. Widget? subtitleView(
    1. BuildContext,
    2. Conversation
    )?,
  4. Widget listItemView(
    1. Conversation
    )?,
  5. ConversationsStyle conversationsStyle = const ConversationsStyle(),
  6. ScrollController? controller,
  7. CometChatTheme? theme,
  8. Widget? backButton,
  9. bool showBackButton = true,
  10. SelectionMode? selectionMode,
  11. dynamic onSelection(
    1. List<Conversation>?
    )?,
  12. String? title,
  13. String? errorStateText,
  14. String? emptyStateText,
  15. dynamic stateCallBack(
    1. CometChatConversationsController controller
    )?,
  16. ConversationsRequestBuilder? conversationsRequestBuilder,
  17. bool? hideError,
  18. WidgetBuilder? loadingStateText,
  19. WidgetBuilder? emptyStateView,
  20. WidgetBuilder? errorStateView,
  21. ListItemStyle? listItemStyle,
  22. Widget? tailView(
    1. Conversation
    )?,
  23. List<CometChatOption>? options(
    1. Conversation,
    2. CometChatConversationsController controller,
    3. BuildContext context
    )?,
  24. AvatarStyle? avatarStyle,
  25. StatusIndicatorStyle? statusIndicatorStyle,
  26. BadgeStyle? badgeStyle,
  27. ReceiptStyle? receiptStyle,
  28. List<Widget>? appBarOptions,
  29. bool? hideSeparator = false,
  30. bool? disableUsersPresence = false,
  31. bool? disableReceipt = false,
  32. Widget? protectedGroupIcon,
  33. Widget? privateGroupIcon,
  34. Widget? readIcon,
  35. Widget? deliveredIcon,
  36. Widget? sentIcon,
  37. ActivateSelection? activateSelection,
  38. String datePattern(
    1. Conversation conversation
    )?,
  39. String? customSoundForMessages,
  40. bool? disableSoundForMessages = false,
  41. String? typingIndicatorText,
  42. DateStyle? dateStyle,
  43. VoidCallback? onBack,
  44. dynamic onItemTap(
    1. Conversation
    )?,
  45. dynamic onItemLongPress(
    1. Conversation
    )?,
  46. bool? disableTyping,
  47. ConfirmDialogStyle? deleteConversationDialogStyle,
  48. OnError? onError,
  49. bool? hideAppbar = false,
  50. bool? disableMentions,
  51. List<CometChatTextFormatter>? textFormatters,
})

Implementation

CometChatConversations({
  super.key,
  this.conversationsProtocol,
  this.subtitleView,
  this.listItemView,
  this.conversationsStyle = const ConversationsStyle(),
  this.controller,
  this.theme,
  this.backButton,
  this.showBackButton = true,
  this.selectionMode,
  this.onSelection,
  this.title,
  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 = false,
  this.disableUsersPresence = false,
  this.disableReceipt = false,
  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,
}) : conversationsController = CometChatConversationsController(
        conversationsBuilderProtocol: conversationsProtocol ??
            UIConversationsBuilder(
              conversationsRequestBuilder ?? ConversationsRequestBuilder(),
            ),
        mode: selectionMode,
        theme: theme ?? cometChatTheme,
        disableSoundForMessages: disableSoundForMessages,
        customSoundForMessages: customSoundForMessages,
        disableUsersPresence: disableUsersPresence,
        disableReceipt: disableReceipt,
        disableTyping: disableTyping,
        deleteConversationDialogStyle: deleteConversationDialogStyle,
        onError: onError,
        textFormatters: textFormatters,
        disableMentions: disableMentions,
      );