SearchButtonMode enum

Represents the search mode for SearchButton, determining how search queries are handled and submitted.

Live mode provides real-time updates to the search callback as the user types, sending:

  • An empty string when the search box opens but is empty.
  • A trimmed non-empty string for active queries.
  • null when the search box closes, indicating no active search.

This mode is ideal for dynamically filtering lists or content in components like Selector or Collection.

Transactional mode only submits non-empty queries upon pressing enter or the close button, closing the search box immediately. Empty submissions are ignored, ensuring the callback receives only valid search terms without nulls.

This mode suits scenarios where search triggers a separate action, such as opening a Dialog or navigating to a results screen, integrating well with PopupMenu for combined search-and-select interfaces or MutableText for editable search history.

Inheritance
Available extensions

Values

live → const SearchButtonMode

Live search mode for real-time query updates.

transactional → const SearchButtonMode

Transactional search mode for submit-only queries.

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
name String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

values → const List<SearchButtonMode>
A constant List of the values in this enum, in order of their declaration.