CNNativeSearchController class
Native iOS search controller that displays a fullscreen search interface.
This widget provides a native UISearchController experience, showing a modal search interface with keyboard focus and native animations.
Example:
final controller = CNNativeSearchController();
// Show the search controller
await controller.show(
placeholder: 'Search items',
onTextChanged: (query) {
print('Search text: $query');
},
onSubmitted: (query) {
print('Search submitted: $query');
},
onCancelled: () {
print('Search cancelled');
},
);
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
dispose(
) → void - Disposes the controller.
-
hide(
) → Future< void> - Hides the search controller.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
show(
{String placeholder = 'Search', CNKeyboardType keyboardType = CNKeyboardType.defaultType, CNKeyboardAppearance keyboardAppearance = CNKeyboardAppearance.defaultAppearance, CNReturnKeyType returnKeyType = CNReturnKeyType.search, bool enablesReturnKeyAutomatically = true, CNAutocapitalizationType autocapitalizationType = CNAutocapitalizationType.none, CNAutocorrectionType autocorrectionType = CNAutocorrectionType.defaultType, CNSpellCheckingType spellCheckingType = CNSpellCheckingType.defaultType, int? barTintColor, int? tintColor, int? searchFieldBackgroundColor, ValueChanged< String> ? onTextChanged, ValueChanged<String> ? onSubmitted, VoidCallback? onCancelled}) → Future<void> - Shows the native search controller as a modal.
-
toString(
) → String -
A string representation of this object.
inherited
-
updateSearchText(
String text) → Future< void> - Updates the search text programmatically.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- platform → const MethodChannel