SearchTextField class
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- SearchTextField
Constructors
-
SearchTextField({Key? key, required dynamic filterList(String), required FocusNode? focusNode, required InputDecoration? inputDecoration, required TextInputAction keyboardAction, required bool obscureText, required dynamic onSubmitSearch(String)?, required bool searchFieldEnabled, required SearchMode searchMode, required TextEditingController? searchTextController, required TextInputType textInputType, required bool displayClearIcon, required bool displaySearchIcon, required Color defaultSuffixIconColor, required double defaultSuffixIconSize, required TextStyle? textStyle, required Color? cursorColor, required int? maxLines, required int? maxLength, required TextAlign textAlign, required List<
String> autoCompleteHints, required TextAlignVertical verticalTextAlign, dynamic onSortTap()?, Widget? secondaryWidget, Widget? sortWidget, String? labelText, FormFieldValidator<String> ? validator, Key? formFieldKey}) -
const
Properties
-
autoCompleteHints
→ List<
String> -
List of autocomplete hints to suggest to the user while typing
final
- cursorColor → Color?
-
Optional custom color for the text cursor
final
- defaultSuffixIconColor → Color
-
The color of the suffix icons (clear and search icons)
final
- defaultSuffixIconSize → double
-
The size of the suffix icons
final
- displayClearIcon → bool
-
Whether to display a clear icon in the search field suffix
final
- displaySearchIcon → bool
-
Whether to display a search icon in the search field suffix
final
- filterList → dynamic Function(String)
-
Callback function that receives the search query to filter the list
final
- focusNode → FocusNode?
-
Optional focus node to manage keyboard focus for the search text field
final
- formFieldKey → Key?
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- inputDecoration → InputDecoration?
-
Optional custom input decoration for styling the search text field
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- keyboardAction → TextInputAction
-
The keyboard action button type (e.g., done, search, next)
final
- labelText → String?
-
Optional label text displayed when the search field is empty
final
- maxLength → int?
-
Maximum character length allowed in the search field
final
- maxLines → int?
-
Maximum number of lines for the search text field
final
- obscureText → bool
-
Whether to hide the text input (used for password fields)
final
- onSortTap → dynamic Function()?
-
Optional callback function invoked when the sort button is tapped
final
- onSubmitSearch → dynamic Function(String)?
-
Optional callback function invoked when the user submits the search
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- searchFieldEnabled → bool
-
Whether the search text field is enabled for user interaction
final
- searchMode → SearchMode
-
Determines when filtering occurs: on text edit or on submit
final
- searchTextController → TextEditingController?
-
Optional text editing controller to programmatically manage the search input
final
- secondaryWidget → Widget?
-
Optional widget to display next to the search field (e.g., filter button)
final
- sortWidget → Widget?
-
Optional custom widget for the sort button
final
- textAlign → TextAlign
-
The horizontal alignment of the text within the search field
final
- textInputType → TextInputType
-
The type of keyboard to display (e.g., text, number, email)
final
- textStyle → TextStyle?
-
Optional custom text style for the search input text
final
-
validator
→ FormFieldValidator<
String> ? -
final
- verticalTextAlign → TextAlignVertical
-
The vertical alignment of the text within the search field
final
Methods
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
createElement(
) → StatelessElement -
Creates a StatelessElement to manage this widget's location in the tree.
inherited
-
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