ChatScreen constructor
ChatScreen(
- {Key? key,
- Color? senderColor,
- Color? inActiveAudioSliderColor,
- Color? activeAudioSliderColor,
- required List<
ChatMessage> messages, - required ScrollController scrollController,
- String sendMessageHintText = 'Enter message here',
- String recordingNoteHintText = 'Now Recording',
- String imageAttachmentFromGalleryText = 'From Gallery',
- String imageAttachmentFromCameraText = 'From Camera',
- String imageAttachmentCancelText = 'Cancel',
- Color chatInputFieldColor = const Color(0xFFCFD8DC),
- TextStyle? imageAttachmentTextStyle,
- required dynamic handleRecord(
- ChatMessage? audioMessage,
- bool canceled
- required dynamic handleImageSelect(
- ChatMessage? imageMessage
- VoidCallback? onSlideToCancelRecord,
- TextEditingController? textEditingController,
- bool disableInput = false,
- BoxDecoration? chatInputFieldDecoration,
- required dynamic onTextSubmit(
- ChatMessage textMessage
- EdgeInsets? chatInputFieldPadding,
- Icon? imageAttachmentFromGalleryIcon,
- Icon? imageAttachmentFromCameraIcon,
- Icon? imageAttachmentCancelIcon,
- TextStyle? messageContainerTextStyle,
- TextStyle? sendDateTextStyle,
- dynamic attachmentClick(
- BuildContext context
Implementation
ChatScreen({
Key? key,
this.senderColor,
this.inActiveAudioSliderColor,
this.activeAudioSliderColor,
required this.messages,
required this.scrollController,
this.sendMessageHintText = 'Enter message here',
this.recordingNoteHintText = 'Now Recording',
this.imageAttachmentFromGalleryText = 'From Gallery',
this.imageAttachmentFromCameraText = 'From Camera',
this.imageAttachmentCancelText = 'Cancel',
this.chatInputFieldColor = const Color(0xFFCFD8DC),
this.imageAttachmentTextStyle,
required this.handleRecord,
required this.handleImageSelect,
this.onSlideToCancelRecord,
this.textEditingController,
this.disableInput = false,
this.chatInputFieldDecoration,
required this.onTextSubmit,
this.chatInputFieldPadding,
this.imageAttachmentFromGalleryIcon,
this.imageAttachmentFromCameraIcon,
this.imageAttachmentCancelIcon,
this.messageContainerTextStyle,
this.sendDateTextStyle,
this.attachmentClick,
}) : super(key: key);