ChatInputField constructor
const
ChatInputField({
- Key? key,
- double buttonRadius = 35,
- double containerBorderRadius = 40,
- required String sendMessageHintText,
- required String recordingNoteHintText,
- TextDirection textDirection = TextDirection.ltr,
- BoxDecoration? chatInputFieldDecoration,
- Widget sliderButtonContent = const Icon(Icons.chevron_right, color: Colors.white, size: 25),
- IconData sendTextIcon = Icons.send,
- ResolutionPreset cameraResolution = ResolutionPreset.high,
- int audioBitRate = 128000,
- int imageQuality = 70,
- double imageMaxWidth = 1440,
- required VoidCallback onSlideToCancelRecord,
- required dynamic handleRecord(
- ChatMessage? audioMessage,
- bool canceled
- required dynamic onTextSubmit(
- ChatMessage text
- required dynamic handleImageSelect(
- ChatMessage? imageMessage
- dynamic handleVideoSelect(
- ChatMessage? videoMessage
- required Color chatInputFieldColor,
- required String imageAttachmentFromGalleryText,
- required String imageAttachmentFromCameraText,
- required String imageAttachmentCancelText,
- required bool disableInput,
- EdgeInsets? chatInputFieldPadding,
- Icon? imageAttachmentFromGalleryIcon,
- Icon? imageAttachmentFromCameraIcon,
- Icon? imageAttachmentCancelIcon,
- TextStyle? imageAttachmentTextStyle,
- TextEditingController? textEditingController,
- dynamic attachmentClick(
- BuildContext context
Implementation
const ChatInputField({
super.key,
this.buttonRadius = 35,
this.containerBorderRadius = 40,
required this.sendMessageHintText,
required this.recordingNoteHintText,
this.textDirection = TextDirection.ltr,
this.chatInputFieldDecoration,
this.sliderButtonContent = const Icon(
Icons.chevron_right,
color: Colors.white,
size: 25,
),
this.sendTextIcon = Icons.send,
this.cameraResolution = ResolutionPreset.high,
this.audioBitRate = 128000,
this.imageQuality = 70,
this.imageMaxWidth = 1440,
required this.onSlideToCancelRecord,
required this.handleRecord,
required this.onTextSubmit,
required this.handleImageSelect,
this.handleVideoSelect,
required this.chatInputFieldColor,
required this.imageAttachmentFromGalleryText,
required this.imageAttachmentFromCameraText,
required this.imageAttachmentCancelText,
required this.disableInput,
this.chatInputFieldPadding,
this.imageAttachmentFromGalleryIcon,
this.imageAttachmentFromCameraIcon,
this.imageAttachmentCancelIcon,
this.imageAttachmentTextStyle,
this.textEditingController,
this.attachmentClick,
});