SafaehSettingsSearchOverlay class
Animated, glass-surface settings search overlay for a page Stack.
The host owns the open state and navigation callback. The widget owns the query controller, focus behavior, clear action, scrim, glass panel, compact result rows, and Android back handling. Place the overlay above the page body and keep the trigger in the app bar:
Stack(
fit: StackFit.expand,
children: [
const SettingsBody(),
SafaehSettingsSearchOverlay(
isOpen: searchOpen,
onClose: closeSearch,
searchIndex: searchIndex,
onResultSelected: jumpToSetting,
),
],
)
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- SafaehSettingsSearchOverlay
Constructors
-
SafaehSettingsSearchOverlay({Key? key, required bool isOpen, required VoidCallback onClose, required SearchIndex searchIndex, required ValueChanged<
SearchResult> onResultSelected, String hintText = 'Search settings...', String initialQuery = '', ValueChanged<String> ? onQueryChanged, bool resultFilter(SearchResult result)?, String sectionTitleBuilder(String sectionKey)?, String settingTitleBuilder(SettingDefinition setting)?, String? settingSubtitleBuilder(SettingDefinition setting)?, bool showResultSubtitles = false, String emptyMessageBuilder(String sectionKey)?, TextEditingController? controller, FocusNode? focusNode, SafaehFloatingAppearance? floatingAppearance, double panelMaxWidth = 680, double panelMaxHeight = 620, bool clearOnClose = true}) -
const
Properties
- clearOnClose → bool
-
Clears the query when the overlay is closed or a result is selected.
final
- controller → TextEditingController?
-
Optional externally owned query controller.
final
- emptyMessageBuilder → String Function(String sectionKey)?
-
Localized empty-results copy builder.
final
- floatingAppearance → SafaehFloatingAppearance?
-
Overrides the Safaeh glass appearance inherited from SafaehTheme.
final
- focusNode → FocusNode?
-
Optional externally owned focus node.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hintText → String
-
Search field hint and closed-trigger tooltip.
final
- initialQuery → String
-
Initial query when an internal controller is created.
final
- isOpen → bool
-
Whether the overlay is visible and consumes input.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- onClose → VoidCallback
-
Closes the overlay. The host must update isOpen.
final
-
onQueryChanged
→ ValueChanged<
String> ? -
Called for every query change, including clear.
final
-
onResultSelected
→ ValueChanged<
SearchResult> -
Called after a result is selected. The overlay closes first.
final
- panelMaxHeight → double
-
Maximum panel height before the result list scrolls.
final
- panelMaxWidth → double
-
Maximum panel width on large screens.
final
- resultFilter → bool Function(SearchResult result)?
-
Optional host-side filter for feature-gated or unavailable settings.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- searchIndex → SearchIndex
-
Built, multi-language settings search index.
final
- sectionTitleBuilder → String Function(String sectionKey)?
-
Localized section title builder.
final
- settingSubtitleBuilder → String? Function(SettingDefinition setting)?
-
Localized setting subtitle builder.
final
- settingTitleBuilder → String Function(SettingDefinition setting)?
-
Localized setting title builder.
final
- showResultSubtitles → bool
-
Whether search rows include the supplied subtitle.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< SafaehSettingsSearchOverlay> -
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