InputOptions class

Input options for customizing the chat input field. Designed to be more aligned with Dila's approach.

Constructors

InputOptions({TextEditingController? textController, FocusNode? focusNode, TextStyle? textStyle, InputDecoration? decoration, int? maxLines = 5, int? minLines = 1, bool sendOnEnter = true, bool readOnly = false, bool autocorrect = true, EdgeInsets? margin, BoxDecoration? containerDecoration, Color? containerBackgroundColor = Colors.transparent, EdgeInsets? padding, EdgeInsets? containerPadding, double? inputHeight, double? inputContainerHeight, BoxConstraints? inputContainerConstraints, InputContainerWidth? inputContainerWidth, bool useOuterContainer = true, bool useOuterMaterial = false, double? materialElevation = 0, Color? materialColor, ShapeBorder? materialShape, EdgeInsets? materialPadding = const EdgeInsets.all(8.0), bool? useScaffoldBackground = false, TextDirection? inputTextDirection, double? positionedLeft, double? positionedRight, double? positionedBottom, double? positionedTop, double? blurStrength, bool clipBehavior = false, Widget sendButtonBuilder(VoidCallback onSend)?, Color? sendButtonColor, Color? sendButtonDisableColor, IconData? sendButtonIcon = Icons.send, double? sendButtonIconSize = 24.0, EdgeInsets? sendButtonPadding = const EdgeInsets.all(4.0), TextInputType? keyboardType = TextInputType.multiline, TextCapitalization textCapitalization = TextCapitalization.sentences, TextInputAction? textInputAction = TextInputAction.newline, TextDirection? textDirection, List<TextInputFormatter>? inputFormatters, bool enableSuggestions = true, bool enableIMEPersonalizedLearning = true, Color? cursorColor, double? cursorHeight, double? cursorWidth, Radius? cursorRadius, bool? showCursor, VoidCallback? onEditingComplete, ValueChanged<String>? onSubmitted, ValueChanged<String>? onChanged, GestureTapCallback? onTap, bool unfocusOnTapOutside = false, MouseCursor? mouseCursor, EditableTextContextMenuBuilder? contextMenuBuilder, UndoHistoryController? undoController, SpellCheckConfiguration? spellCheckConfiguration, TextMagnifierConfiguration? magnifierConfiguration, SmartDashesType? smartDashesType, SmartQuotesType? smartQuotesType, TextSelectionControls? selectionControls, Widget? voiceWidget})
const
InputOptions.custom({InputDecoration? decoration, TextStyle? textStyle, Widget sendButtonBuilder(VoidCallback onSend)?, bool useOuterContainer = true, TextEditingController? textController, bool sendOnEnter = true})
Creates a custom input field with complete control.
factory
InputOptions.glassmorphic({List<Color>? colors, double borderRadius = 24.0, double blurStrength = 10.0, String? hintText, Color? textColor, Color? hintColor, bool useOuterContainer = true, TextEditingController? textController, bool sendOnEnter = true})
Creates a glassmorphic input field with a frosted glass effect.
factory
InputOptions.minimal({String? hintText, Color? textColor, Color? hintColor, Color? backgroundColor, double? borderRadius, TextEditingController? textController, bool sendOnEnter = true})
Creates a minimal input field with no outer container.
factory

Properties

autocorrect bool
final
blurStrength double?
final
clipBehavior bool
final
containerBackgroundColor Color?
final
containerDecoration BoxDecoration?
final
containerPadding EdgeInsets?
final
contextMenuBuilder EditableTextContextMenuBuilder?
final
cursorColor Color?
final
cursorHeight double?
final
cursorRadius Radius?
final
cursorWidth double?
final
decoration InputDecoration?
final
enableIMEPersonalizedLearning bool
final
enableSuggestions bool
final
focusNode FocusNode?
final
hashCode int
The hash code for this object.
no setterinherited
inputContainerConstraints BoxConstraints?
final
inputContainerHeight double?
final
inputContainerWidth InputContainerWidth?
final
inputFormatters List<TextInputFormatter>?
final
inputHeight double?
final
inputTextDirection TextDirection?
final
keyboardType TextInputType?
final
magnifierConfiguration TextMagnifierConfiguration?
final
margin EdgeInsets?
final
materialColor Color?
final
materialElevation double?
final
materialPadding EdgeInsets?
final
materialShape ShapeBorder?
final
maxLines int?
final
minLines int?
final
mouseCursor MouseCursor?
final
onChanged ValueChanged<String>?
final
onEditingComplete VoidCallback?
final
onSubmitted ValueChanged<String>?
final
onTap GestureTapCallback?
final
padding EdgeInsets?
final
positionedBottom double?
final
positionedLeft double?
final
positionedRight double?
final
positionedTop double?
final
readOnly bool
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectionControls TextSelectionControls?
final
sendButtonBuilder Widget Function(VoidCallback onSend)?
final
sendButtonColor Color?
final
sendButtonDisableColor Color?
final
sendButtonIcon IconData?
final
sendButtonIconSize double?
final
sendButtonPadding EdgeInsets?
final
sendOnEnter bool
final
showCursor bool?
final
smartDashesType SmartDashesType?
final
smartQuotesType SmartQuotesType?
final
spellCheckConfiguration SpellCheckConfiguration?
final
textCapitalization TextCapitalization
final
textController TextEditingController?
final
textDirection TextDirection?
final
textInputAction TextInputAction?
final
textStyle TextStyle?
final
undoController UndoHistoryController?
final
unfocusOnTapOutside bool
Whether to unfocus the text field when tapping outside it
final
useOuterContainer bool
final
useOuterMaterial bool
Whether to use a Material widget for the outer container. If false, no Material widget will be used at all, removing all elevation, color and shadow effects completely.
final
useScaffoldBackground bool?
final
voiceWidget Widget?
final

Methods

copyWith({TextEditingController? textController, TextStyle? textStyle, InputDecoration? decoration, int? maxLines, int? minLines, bool? sendOnEnter, bool? readOnly, bool? autocorrect, EdgeInsets? margin, BoxDecoration? containerDecoration, Color? containerBackgroundColor, EdgeInsets? padding, EdgeInsets? containerPadding, double? inputHeight, double? inputContainerHeight, BoxConstraints? inputContainerConstraints, InputContainerWidth? inputContainerWidth, bool? useOuterContainer, bool? useOuterMaterial, double? materialElevation, Color? materialColor, ShapeBorder? materialShape, EdgeInsets? materialPadding, bool? useScaffoldBackground, TextDirection? textDirection, double? positionedLeft, double? positionedRight, double? positionedBottom, double? positionedTop, double? blurStrength, bool? clipBehavior, Widget sendButtonBuilder(VoidCallback onSend)?, Color? sendButtonColor, Color? sendButtonDisableColor, IconData? sendButtonIcon, double? sendButtonIconSize, EdgeInsets? sendButtonPadding, TextInputType? keyboardType, TextCapitalization? textCapitalization, TextInputAction? textInputAction, List<TextInputFormatter>? inputFormatters, bool? enableSuggestions, bool? enableIMEPersonalizedLearning, Color? cursorColor, double? cursorHeight, double? cursorWidth, Radius? cursorRadius, bool? showCursor, VoidCallback? onEditingComplete, ValueChanged<String>? onSubmitted, ValueChanged<String>? onChanged, GestureTapCallback? onTap, bool? unfocusOnTapOutside, MouseCursor? mouseCursor, EditableTextContextMenuBuilder? contextMenuBuilder, UndoHistoryController? undoController, SpellCheckConfiguration? spellCheckConfiguration, TextMagnifierConfiguration? magnifierConfiguration, SmartDashesType? smartDashesType, SmartQuotesType? smartQuotesType, TextSelectionControls? selectionControls}) InputOptions
Creates a copy with the given fields replaced with new values.
effectiveSendButtonBuilder(bool isVoice, VoidCallback onSend) Widget
Helper method to build an effective send button based on configuration
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