CometChatMessageComposer constructor

CometChatMessageComposer({
  1. Key? key,
  2. User? user,
  3. Group? group,
  4. MessageComposerStyle messageComposerStyle = const MessageComposerStyle(),
  5. String? placeholderText,
  6. bool hideLiveReaction = false,
  7. bool disableTypingEvents = false,
  8. bool disableSoundForMessages = false,
  9. int parentMessageId = 0,
  10. String? customSoundForMessage,
  11. String? customSoundForMessagePackage,
  12. ComposerWidgetBuilder? auxiliaryButtonView,
  13. ComposerWidgetBuilder? headerView,
  14. ComposerWidgetBuilder? footerView,
  15. ComposerWidgetBuilder? secondaryButtonView,
  16. Widget? sendButtonView,
  17. ComposerActionsBuilder? attachmentOptions,
  18. String? text,
  19. dynamic onChange(
    1. String
    )?,
  20. int? maxLine,
  21. AuxiliaryButtonsAlignment? auxiliaryButtonsAlignment,
  22. String? liveReactionIconURL,
  23. String? attachmentIconURL,
  24. void stateCallBack(
    1. CometChatMessageComposerController
    )?,
  25. CometChatTheme? theme,
  26. Widget? attachmentIcon,
  27. Widget? liveReactionIcon,
  28. OnError? onError,
  29. Widget? recordIcon,
  30. Widget? playIcon,
  31. Widget? deleteIcon,
  32. Widget? stopIcon,
  33. Widget? submitIcon,
  34. MediaRecorderStyle? mediaRecorderStyle,
  35. Widget? pauseIcon,
  36. dynamic onSendButtonTap(
    1. BuildContext,
    2. BaseMessage,
    3. PreviewMessageMode?
    )?,
  37. bool? hideVoiceRecording,
  38. Widget? voiceRecordingIcon,
  39. Widget? aiIcon,
  40. String? aiIconURL,
  41. String? aiIconPackageName,
  42. AIOptionsStyle? aiOptionStyle,
  43. List<CometChatTextFormatter>? textFormatters,
  44. bool? disableMentions,
  45. GlobalKey<State<StatefulWidget>>? messageComposerKey,
  46. TextEditingController? textEditingController,
})

Implementation

CometChatMessageComposer(
    {super.key,
    this.user,
    this.group,
    this.messageComposerStyle = const MessageComposerStyle(),
    this.placeholderText,
    bool hideLiveReaction = false,
    bool disableTypingEvents = false,
    bool disableSoundForMessages = false,
    this.parentMessageId = 0,
    String? customSoundForMessage,
    String? customSoundForMessagePackage,
    this.auxiliaryButtonView,
    ComposerWidgetBuilder? headerView,
    ComposerWidgetBuilder? footerView,
    this.secondaryButtonView,
    this.sendButtonView,
    ComposerActionsBuilder? attachmentOptions,
    this.text,
    this.onChange,
    this.maxLine,
    this.auxiliaryButtonsAlignment,
    String? liveReactionIconURL,
    this.attachmentIconURL,
    void Function(CometChatMessageComposerController)? stateCallBack,
    this.theme,
    this.attachmentIcon,
    this.liveReactionIcon,
    OnError? onError,
    this.recordIcon,
    this.playIcon,
    this.deleteIcon,
    this.stopIcon,
    this.submitIcon,
    this.mediaRecorderStyle,
    this.pauseIcon,
    Function(BuildContext, BaseMessage, PreviewMessageMode?)? onSendButtonTap,
    this.hideVoiceRecording,
    this.voiceRecordingIcon,
    this.aiIcon,
    this.aiIconURL,
    this.aiIconPackageName,
    this.aiOptionStyle,
    List<CometChatTextFormatter>? textFormatters,
    this.disableMentions,
    this.messageComposerKey,
      this.textEditingController,
    })
    : assert(user != null || group != null,
          "One of user or group should be passed"),
      assert(user == null || group == null,
          "Only one of user or group should be passed"),
      cometChatMessageComposerController = CometChatMessageComposerController(
          parentMessageId: parentMessageId,
          disableSoundForMessages: disableSoundForMessages,
          customSoundForMessage: customSoundForMessage,
          customSoundForMessagePackage: customSoundForMessagePackage,
          group: group,
          user: user,
          text: text,
          disableTypingEvents: disableTypingEvents,
          hideLiveReaction: hideLiveReaction,
          attachmentOptions: attachmentOptions,
          liveReactionIconURL: liveReactionIconURL,
          stateCallBack: stateCallBack,
          footerView: footerView,
          headerView: headerView,
          onSendButtonTap: onSendButtonTap,
          onError: onError,
          aiOptionStyle: aiOptionStyle,
          theme: theme,
          textFormatters: textFormatters,
        textEditingController: textEditingController
      );