CometChatConversations constructor

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

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,
      );