Skip to main content

Message Input

CometChatMessageInput is a component that provides a skeleton layout for contents of CometChatMessageComposer like TextField, auxiliary options, primary button view and attachment options.

Properties

PropertiesTypeDescription
textStringinitial text for the input field
placeholderTextStringsets hint text for the input field
onChangeFunction(String)callback to handle change in value of text in the input field
styleMessageInputStyleprovides style to this widget
maxLineintmaximum lines allowed to increase in the input field
secondaryButtonViewWidgetadditional ui component apart from primary
auxiliaryButtonViewWidgetadditional ui component apart from primary and secondary
primaryButtonViewWidgeta ui component that would trigger basic functionality
auxiliaryButtonsAlignmentAuxiliaryButtonsAlignmentcontrols position auxiliary button view
textEditingControllerTextEditingControllerprovides control of the input field
focusNodeFocusNodeallows to listen to changes in focus state of the TextFormField

MessageInputStyle

MessageInputStyle helps to customize CometChatMessageInput

PropertiesTypeDescription
heightdoubleused to set height
widthdoubleused to set width
borderBoxBorderused to set border
borderRadiusdoubleused to set border radius
backgroundColorused to set the background color
gradientGradientused to set background gradient
inputTextStyleTextStyleused to set input text style
placeholderTextStyleTextStyleused to text style of the hint text
dividerTintColorused to set color to the divider separating input field and bottom bar