SuggestionTextField class
SuggestionTextField - A text field with search history and auto-suggestions
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- SuggestionTextField
Constructors
-
SuggestionTextField({Key? key, required String fieldName, SuggestionFieldConfig config = const SuggestionFieldConfig(), OnSuggestionSelected? onSuggestionSelected, OnSubmit? onSubmit, Widget suggestionBuilder(BuildContext context, String suggestion, VoidCallback onTap, VoidCallback? onRemove)?, BoxDecoration? suggestionBoxDecoration, TextStyle? suggestionTextStyle, TextEditingController? controller, FocusNode? focusNode, InputDecoration? decoration, String? labelText, String? hintText, TextStyle? style, TextAlign textAlign = TextAlign.start, TextInputType? keyboardType, TextInputAction? textInputAction, bool readOnly = false, bool enabled = true, bool obscureText = false, int? maxLines = 1, int? maxLength, ValueChanged<
String> ? onChanged, GestureTapCallback? onTap, VoidCallback? onEditingComplete, FormFieldValidator<String> ? validator, AutovalidateMode? autovalidateMode, TextStyle? labelStyle, TextStyle? hintStyle, Widget? prefixIcon, Widget? suffixIcon, Color? fillColor, bool filled = false, EdgeInsetsGeometry? contentPadding, InputBorder? border, InputBorder? enabledBorder, InputBorder? focusedBorder}) -
const
Properties
- autovalidateMode → AutovalidateMode?
-
final
- border → InputBorder?
-
final
- config → SuggestionFieldConfig
-
Configuration for suggestion behavior
final
- contentPadding → EdgeInsetsGeometry?
-
final
- controller → TextEditingController?
-
final
- decoration → InputDecoration?
-
final
- enabled → bool
-
final
- enabledBorder → InputBorder?
-
final
- fieldName → String
-
Unique field name for storing history (REQUIRED)
final
- fillColor → Color?
-
final
- filled → bool
-
final
- focusedBorder → InputBorder?
-
final
- focusNode → FocusNode?
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hintStyle → TextStyle?
-
final
- hintText → String?
-
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- keyboardType → TextInputType?
-
final
- labelStyle → TextStyle?
-
final
- labelText → String?
-
final
- maxLength → int?
-
final
- maxLines → int?
-
final
- obscureText → bool
-
final
-
onChanged
→ ValueChanged<
String> ? -
final
- onEditingComplete → VoidCallback?
-
final
-
onSubmit
→ ValueChanged<
String> ? -
Callback when text is submitted
final
-
onSuggestionSelected
→ ValueChanged<
String> ? -
Callback when a suggestion is selected
final
- onTap → VoidCallback?
-
final
- prefixIcon → Widget?
-
final
- readOnly → bool
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- style → TextStyle?
-
final
- suffixIcon → Widget?
-
final
- suggestionBoxDecoration → BoxDecoration?
-
Style for suggestion box
final
- suggestionBuilder → Widget Function(BuildContext context, String suggestion, VoidCallback onTap, VoidCallback? onRemove)?
-
Custom suggestion item builder
final
- suggestionTextStyle → TextStyle?
-
Style for suggestion items
final
- textAlign → TextAlign
-
final
- textInputAction → TextInputAction?
-
final
-
validator
→ FormFieldValidator<
String> ? -
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< SuggestionTextField> -
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, int wrapWidth = 65}) → 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