CometChatMessageComposer constructor
CometChatMessageComposer({
- Key? key,
- User? user,
- Group? group,
- MessageComposerStyle messageComposerStyle = const MessageComposerStyle(),
- String? placeholderText,
- bool hideLiveReaction = false,
- bool disableTypingEvents = false,
- bool disableSoundForMessages = false,
- int parentMessageId = 0,
- String? customSoundForMessage,
- String? customSoundForMessagePackage,
- ComposerWidgetBuilder? auxiliaryButtonView,
- ComposerWidgetBuilder? headerView,
- ComposerWidgetBuilder? secondaryButtonView,
- Widget? sendButtonView,
- ComposerActionsBuilder? attachmentOptions,
- String? text,
- dynamic onChange()?,
- int? maxLine,
- AuxiliaryButtonsAlignment? auxiliaryButtonsAlignment,
- String? liveReactionIconURL,
- String? attachmentIconURL,
- void stateCallBack()?,
- CometChatTheme? theme,
- Widget? attachmentIcon,
- Widget? liveReactionIcon,
- OnError? onError,
- Widget? recordIcon,
- Widget? playIcon,
- Widget? deleteIcon,
- Widget? stopIcon,
- Widget? submitIcon,
- MediaRecorderStyle? mediaRecorderStyle,
- Widget? pauseIcon,
- dynamic onSendButtonTap()?,
- bool? hideVoiceRecording,
- Widget? voiceRecordingIcon,
- Widget? aiIcon,
- String? aiIconURL,
- String? aiIconPackageName,
- AIOptionsStyle? aiOptionStyle,
- List<
CometChatTextFormatter> ? textFormatters, - bool? disableMentions,
- GlobalKey<
State< ? messageComposerKey,StatefulWidget> > - 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
);