VooSearchField class
A styled search input field with keyboard shortcut support
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- VooSearchField
Constructors
-
VooSearchField({Key? key, TextEditingController? controller, FocusNode? focusNode, String? hintText, ValueChanged<
String> ? onChanged, ValueChanged<String> ? onSubmitted, VoidCallback? onClear, VoidCallback? onFocused, bool expanded = false, double? width, double? height, bool showKeyboardHint = true, String? keyboardHintText, bool enableKeyboardShortcut = true, bool showClearButton = true, bool showSearchIcon = true, Widget? prefixWidget, Widget? suffixWidget, Color? backgroundColor, Color? focusedBackgroundColor, Color? borderColor, Color? focusedBorderColor, BorderRadius? borderRadius, TextStyle? textStyle, TextStyle? hintStyle, EdgeInsets? contentPadding, bool readOnly = false, bool enabled = true, bool autofocus = false}) -
const
Properties
- autofocus → bool
-
Whether to autofocus
final
- backgroundColor → Color?
-
Background color
final
- borderColor → Color?
-
Border color
final
- borderRadius → BorderRadius?
-
Border radius
final
- contentPadding → EdgeInsets?
-
Padding inside the field
final
- controller → TextEditingController?
-
Controller for the text field
final
- enabled → bool
-
Whether the field is enabled
final
- enableKeyboardShortcut → bool
-
Whether to enable keyboard shortcut to focus
final
- expanded → bool
-
Whether the search field is expanded (full width)
final
- focusedBackgroundColor → Color?
-
Background color when focused
final
- focusedBorderColor → Color?
-
Border color when focused
final
- focusNode → FocusNode?
-
Focus node for the text field
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → double?
-
Height of the search field
final
- hintStyle → TextStyle?
-
Hint text style
final
- hintText → String?
-
Hint text to display when empty
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- keyboardHintText → String?
-
Keyboard shortcut hint text (e.g., "⌘K")
final
-
onChanged
→ ValueChanged<
String> ? -
Callback when text changes
final
- onClear → VoidCallback?
-
Callback when the field is cleared
final
- onFocused → VoidCallback?
-
Callback when the field gains focus
final
-
onSubmitted
→ ValueChanged<
String> ? -
Callback when search is submitted (enter pressed)
final
- prefixWidget → Widget?
-
Custom prefix widget (replaces search icon)
final
- readOnly → bool
-
Whether the field is read-only
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showClearButton → bool
-
Whether to show the clear button
final
- showKeyboardHint → bool
-
Whether to show the keyboard shortcut hint
final
- showSearchIcon → bool
-
Whether to show the search icon
final
- suffixWidget → Widget?
-
Custom suffix widget (replaces clear button)
final
- textStyle → TextStyle?
-
Text style
final
- width → double?
-
Width of the search field (ignored if expanded)
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< VooSearchField> -
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