CNSearchConfig class
Configuration for search integration in native components.
Used with search-enabled constructors like:
CNToolbar.search()CNNavigationBar.search()CNTabBar.search()
Constructors
-
CNSearchConfig({String placeholder = 'Search', CNSymbol searchIcon = const CNSymbol('magnifyingglass'), bool showsCancelButton = true, Duration animationDuration = const Duration(milliseconds: 300), double searchBarHeight = 50.0, VoidCallback? onSearchActivated, ValueChanged<
String> ? onSearchTextChanged, ValueChanged<String> ? onSearchSubmitted, VoidCallback? onSearchCancelled, SearchResultsBuilder? resultsBuilder, bool showResultsOverlay = true}) -
Creates a search configuration.
const
Properties
- animationDuration → Duration
-
Duration of expand/collapse animation.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- onSearchActivated → VoidCallback?
-
Called when search bar is activated/focused (tapped).
final
- onSearchCancelled → VoidCallback?
-
Called when search is cancelled.
final
-
onSearchSubmitted
→ ValueChanged<
String> ? -
Called when search is submitted (return key pressed).
final
-
onSearchTextChanged
→ ValueChanged<
String> ? -
Called when search text changes.
final
- placeholder → String
-
Placeholder text for the search bar.
final
- resultsBuilder → SearchResultsBuilder?
-
Builder for search results overlay.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- searchBarHeight → double
-
Height of the search bar when expanded.
final
- searchIcon → CNSymbol
-
Icon to display for the search button/tab.
final
- showResultsOverlay → bool
-
Whether to show results overlay as user types.
final
- showsCancelButton → bool
-
Whether to show the cancel button in the search bar.
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 -
The equality operator.
inherited