InputOptions class Customization
Constructors
-
InputOptions({TextEditingController? textController, FocusNode? focusNode, TextDirection inputTextDirection = TextDirection.ltr, Future<
List< onMention(String trigger, String value, void onMentionClick(String value))?, List<Widget> >String> onMentionTriggers = const <String>['@'], void onTextChange(String value)?, bool inputDisabled = false, InputDecoration? inputDecoration, TextCapitalization textCapitalization = TextCapitalization.none, bool alwaysShowSend = false, bool sendOnEnter = false, TextInputAction? textInputAction, int? maxInputLength, List<Widget> ? leading, List<Widget> ? trailing, Widget sendButtonBuilder(void send())?, TextStyle? inputTextStyle, BoxDecoration? inputToolbarStyle, int inputMaxLines = 5, bool showTraillingBeforeSend = false, EdgeInsets? inputToolbarPadding = const EdgeInsets.all(8.0), EdgeInsets? inputToolbarMargin = const EdgeInsets.only(top: 8.0), CursorStyle cursorStyle = const CursorStyle(), bool autocorrect = true}) -
const
Properties
- alwaysShowSend → bool
-
Always show the send button, will be hidden when the text is empty otherwise
final
- autocorrect → bool
-
Whether to enable autocorrection. Defaults to true.
final
- cursorStyle → CursorStyle
-
Style of the cursor
final
- focusNode → FocusNode?
-
Focus node of the input field
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- inputDecoration → InputDecoration?
-
Input decoration to customize the design of the input
You can use defaultInputDecoration to only orride some variables
final
- inputDisabled → bool
-
To make the input disabled
final
- inputMaxLines → int
-
Max number of visible lines of the input, it will grow until this value and then scroll
final
- inputTextDirection → TextDirection
-
Use to change the direction of the text
final
- inputTextStyle → TextStyle?
-
To customize the text style of the inpu
final
- inputToolbarMargin → EdgeInsets?
-
Margin of the overall container of the input
final
- inputToolbarPadding → EdgeInsets?
-
Padding of the overall container of the input
final
- inputToolbarStyle → BoxDecoration?
-
To customize the overall container of the input
final
-
leading
→ List<
Widget> ? -
A list of widget to show before the input
final
- maxInputLength → int?
-
If you want to limit the length of the text
final
-
onMention
→ Future<
List< Function(String trigger, String value, void onMentionClick(String value))?Widget> > -
Function to call when a mention is triggered in the input,
ie: typing ' @'
You need to return a list of widget that will be shown inside the selection overlay,
for instance user ListTiles
final
-
onMentionTriggers
→ List<
String> -
The list of string triggers for the onMention callback
By default it only includes '@' character
final
- onTextChange → void Function(String value)?
-
Function to call when the input text changee
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sendButtonBuilder → Widget Function(void send())?
-
Builder to create your own send button widget
You can use defaultSendButton to only override some variables
final
- sendOnEnter → bool
-
Send the message when the user presses the enter key
final
- showTraillingBeforeSend → bool
-
If trailing should be shown before or after the send button
final
- textCapitalization → TextCapitalization
-
Use to override the default TextCapitalization
final
- textController → TextEditingController?
-
Text controller for the input field
final
- textInputAction → TextInputAction?
-
An action the user has requested the text input control to perform
final
-
trailing
→ List<
Widget> ? -
A list of widget to show after the input
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited