Import
import 'package:flutter/widgets.dart';
import 'package:fluttyui/fluttyui.dart' as ui;API Reference
The declarations below match the current FluttyUI source. Types are shown without the optional ui. import prefix.
SearchField
const SearchField({
super.key,
this.size,
required this.controller,
this.onChanged,
this.onSubmitted,
this.onClear,
this.suggestions,
this.onSuggestionSelected,
this.focusNode,
this.readOnly = false,
this.autocorrect = true,
this.textInputAction,
this.textCapitalization = TextCapitalization.none,
this.autofillHints,
this.inputFormatters,
this.onEditingComplete,
this.hintText = 'Search...',
this.backgroundColor,
this.foregroundColor,
this.hintColor,
this.borderColor,
this.focusColor,
this.borderRadius,
this.menuBorderRadius,
this.menuPadding,
this.maxMenuHeight = 280,
this.padding,
this.height,
this.fontSize,
this.optionPadding,
this.optionFontSize,
this.showClearButton = true,
this.showShadow = true,
this.autofocus = false,
this.enabled = true,
this.maxSuggestions = 6,
this.suggestionBuilder,
});| Parameter | Type | Required | Default |
|---|---|---|---|
key | Key? | No | null |
size | ComponentSize? | No | null |
controller | TextEditingController | Yes | — |
onChanged | ValueChanged<String>? | No | null |
onSubmitted | ValueChanged<String>? | No | null |
onClear | VoidCallback? | No | null |
suggestions | List<T>? | No | null |
onSuggestionSelected | ValueChanged<T>? | No | null |
focusNode | FocusNode? | No | null |
readOnly | bool | No | false |
autocorrect | bool | No | true |
textInputAction | TextInputAction? | No | null |
textCapitalization | TextCapitalization | No | TextCapitalization.none |
autofillHints | Iterable<String>? | No | null |
inputFormatters | List<TextInputFormatter>? | No | null |
onEditingComplete | VoidCallback? | No | null |
hintText | String | No | 'Search...' |
backgroundColor | Color? | No | null |
foregroundColor | Color? | No | null |
hintColor | Color? | No | null |
borderColor | Color? | No | null |
focusColor | Color? | No | null |
borderRadius | double? | No | null |
menuBorderRadius | double? | No | null |
menuPadding | EdgeInsetsGeometry? | No | null |
maxMenuHeight | double | No | 280 |
padding | EdgeInsetsGeometry? | No | null |
height | double? | No | null |
fontSize | double? | No | null |
optionPadding | EdgeInsetsGeometry? | No | null |
optionFontSize | double? | No | null |
showClearButton | bool | No | true |
showShadow | bool | No | true |
autofocus | bool | No | false |
enabled | bool | No | true |
maxSuggestions | int | No | 6 |
suggestionBuilder | Widget Function(BuildContext context, T suggestion)? | No | null |
Application Setup
Place components under FluttyApp to provide theme, navigation, localization, and overlay defaults. Use theme tokens for shared appearance settings.
Source
lib/src/widgets/forms/search_field/search_field.dart
This reference is generated from the SearchField declaration in the FluttyUI core checkout. The component catalog lists the other available building blocks.

