ChatScreen class
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- ChatScreen
Constructors
-
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)?})
Properties
- activeAudioSliderColor → Color?
-
color of the active part of the audio slider
final
- attachmentClick → dynamic Function(BuildContext context)?
-
this is an optional parameter to override the default attachment bottom sheet
final
- chatInputFieldColor → Color
-
the color of the outer container and the color used to hide
the text on slide
final
- chatInputFieldDecoration → BoxDecoration?
-
to change the appearance of the chat input field
final
- chatInputFieldPadding → EdgeInsets?
-
git the chat input field padding
final
- disableInput → bool
-
use this flag to disable the input
final
- handleImageSelect → dynamic Function(ChatMessage? imageMessage)
-
required
function to handel image selection this method will pass a ChatMessagefinal - handleRecord → dynamic Function(ChatMessage? audioMessage, bool canceled)
-
required
function to handel successful recordings, bass to override this method will pass a ChatMessage and if the usedcanceled
the recordingfinal - hashCode → int
-
The hash code for this object.
no setterinherited
- imageAttachmentCancelIcon → Icon?
-
Icon shown wen trying to chose image attachment cancel text in attachment
bottom sheet
final
- imageAttachmentCancelText → String
-
text shown wen trying to chose image attachment cancel text in attachment
bottom sheet
final
- imageAttachmentFromCameraIcon → Icon?
-
Icon shown wen trying to chose image attachment from camera in attachment
bottom sheet
final
- imageAttachmentFromCameraText → String
-
text shown wen trying to chose image attachment from camera in attachment
bottom sheet
final
- imageAttachmentFromGalleryIcon → Icon?
-
Icon shown wen trying to chose image attachment from gallery in attachment
bottom sheet
final
- imageAttachmentFromGalleryText → String
-
these parameters for changing the text and icons in the
attachment-bottom-sheet
text shown wen trying to chose image attachment from gallery in attachment bottom sheetfinal - imageAttachmentTextStyle → TextStyle?
-
image attachment text style in attachment
bottom sheet
final
- inActiveAudioSliderColor → Color?
-
color of the inactive part of the audio slider
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- messageContainerTextStyle → TextStyle?
-
text style for the message container
final
-
messages
→ List<
ChatMessage> -
required
the list of chat messagesfinal - onSlideToCancelRecord → VoidCallback?
-
to handel canceling of the record
final
- onTextSubmit → dynamic Function(ChatMessage textMessage)
-
required
handeltext message
on submit this method will pass a ChatMessagefinal - recordingNoteHintText → String
-
hint text to be shown for recording voice note
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrollController → ScrollController
-
required
scrollController for the chat screenfinal - sendDateTextStyle → TextStyle?
-
text style for the message container date
final
- senderColor → Color?
-
color of all message containers if its belongs to the user
final
- sendMessageHintText → String
-
hint text to be shown for sending messages
final
- textEditingController → TextEditingController?
-
TextEditingController to handel input text
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → _ChatScreenState -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited