ChatInputField constructor

const ChatInputField({
  1. Key? key,
  2. double buttonRadius = 35,
  3. double containerBorderRadius = 40,
  4. required String sendMessageHintText,
  5. required String recordingNoteHintText,
  6. TextDirection textDirection = TextDirection.ltr,
  7. BoxDecoration? chatInputFieldDecoration,
  8. Widget sliderButtonContent = const Icon(Icons.chevron_right, color: Colors.white, size: 25),
  9. IconData sendTextIcon = Icons.send,
  10. ResolutionPreset cameraResolution = ResolutionPreset.high,
  11. int audioBitRate = 128000,
  12. int imageQuality = 70,
  13. double imageMaxWidth = 1440,
  14. required VoidCallback onSlideToCancelRecord,
  15. required dynamic handleRecord(
    1. ChatMessage? audioMessage,
    2. bool canceled
    ),
  16. required dynamic onTextSubmit(
    1. ChatMessage text
    ),
  17. required dynamic handleImageSelect(
    1. ChatMessage? imageMessage
    ),
  18. dynamic handleVideoSelect(
    1. ChatMessage? videoMessage
    )?,
  19. required Color chatInputFieldColor,
  20. required String imageAttachmentFromGalleryText,
  21. required String imageAttachmentFromCameraText,
  22. required String imageAttachmentCancelText,
  23. required bool disableInput,
  24. EdgeInsets? chatInputFieldPadding,
  25. Icon? imageAttachmentFromGalleryIcon,
  26. Icon? imageAttachmentFromCameraIcon,
  27. Icon? imageAttachmentCancelIcon,
  28. TextStyle? imageAttachmentTextStyle,
  29. TextEditingController? textEditingController,
  30. dynamic attachmentClick(
    1. 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,
});