LiquidSearch class
The search tab's field. Give it to LiquidShell.search
with a destination whose role is LiquidDestinationRole.search.
- Annotations
Constructors
-
LiquidSearch({required LiquidSearchController controller, String? placeholder, List<
String> ? scopes, ValueChanged<String> ? onChanged, ValueChanged<String> ? onSubmitted, bool dismissKeyboardOnDrag = true}) -
Creates the search config.
const
Properties
- controller → LiquidSearchController
-
The query, the active state and the scope. Owned by the app: the app
creates and disposes it and keeps it alive as long as the shell; the
shell never disposes it. A new controller between builds is fine.
final
- dismissKeyboardOnDrag → bool
-
Whether a user drag that scrolls the shell's body (the results, a
page pushed in the search tab) puts the keyboard away while the search
is active, keeping the search, as Apple Music does. A programmatic
scroll never does. Default true. See
LiquidSearchController.dismissKeyboard.final - hashCode → int
-
The hash code for this object.
no setteroverride
-
onChanged
→ ValueChanged<
String> ? -
Every text change the user makes, IME composition included. Not called
for text the app sets through controller.
final
-
onSubmitted
→ ValueChanged<
String> ? -
The user pressed the keyboard's Search key.
final
- placeholder → String?
-
Text of the empty field. Null: the platform's own ("Search" in the
device language natively,
LiquidShellStrings.searchPlaceholderin the Flutter field).final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
scopes
→ List<
String> ? -
Scope titles ("All", "Songs", "Places"), two or more, or null for none.
Native chrome on iOS 26+ shows them in UIKit's scope
bar while the search is active; elsewhere
LiquidSearchScopeBarshows them. Bound to LiquidSearchController.scopeIndex.final
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 -
Field by field, scopes by value; callbacks by identity.
override