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.
SearchAnchor
const SearchAnchor({
super.key,
this.size,
required this.suggestionsBuilder,
this.controller,
this.builder,
this.suggestionBuilder,
this.displayStringForSuggestion,
this.onSuggestionSelected,
this.onChanged,
this.onSubmitted,
this.emptyBuilder,
this.loadingBuilder,
this.errorBuilder,
this.hintText = 'Search...',
this.suggestionsLabel = 'Suggestions',
this.debounce = const Duration(milliseconds: 150),
this.closeOnSelect = true,
this.enabled = true,
});| Parameter | Type | Required | Default |
|---|---|---|---|
key | Key? | No | null |
size | ComponentSize? | No | null |
suggestionsBuilder | FutureOr<Iterable<T>> Function(BuildContext context, String query) | Yes | — |
controller | TextEditingController? | No | null |
builder | Widget Function(BuildContext context, VoidCallback openView)? | No | null |
suggestionBuilder | Widget Function(BuildContext context, T suggestion)? | No | null |
displayStringForSuggestion | String Function(T suggestion)? | No | null |
onSuggestionSelected | ValueChanged<T>? | No | null |
onChanged | ValueChanged<String>? | No | null |
onSubmitted | ValueChanged<String>? | No | null |
emptyBuilder | WidgetBuilder? | No | null |
loadingBuilder | WidgetBuilder? | No | null |
errorBuilder | Widget Function(BuildContext context, Object error)? | No | null |
hintText | String | No | 'Search...' |
suggestionsLabel | String | No | 'Suggestions' |
debounce | Duration | No | const Duration(milliseconds: 150) |
closeOnSelect | bool | No | true |
enabled | bool | No | true |
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_anchor/search_anchor.dart
This reference is generated from the SearchAnchor declaration in the FluttyUI core checkout. The component catalog lists the other available building blocks.

