CNSearchBar constructor
const
CNSearchBar({
- Key? key,
- String placeholder = 'Search',
- ValueChanged<
String> ? onChanged, - ValueChanged<
String> ? onSubmitted, - VoidCallback? onCancelTap,
- ValueChanged<
bool> ? onExpandStateChanged, - bool expandable = true,
- bool initiallyExpanded = false,
- double collapsedWidth = 44.0,
- double expandedHeight = 36.0,
- Color? tint,
- Color? backgroundColor,
- Color? textColor,
- Color? placeholderColor,
- bool showCancelButton = true,
- String cancelText = 'Cancel',
- bool autofocus = false,
- CNSearchBarController? controller,
- CNSymbol? searchIcon,
- CNSymbol? clearIcon,
Creates an expandable search bar.
Implementation
const CNSearchBar({
super.key,
this.placeholder = 'Search',
this.onChanged,
this.onSubmitted,
this.onCancelTap,
this.onExpandStateChanged,
this.expandable = true,
this.initiallyExpanded = false,
this.collapsedWidth = 44.0,
this.expandedHeight = 36.0,
this.tint,
this.backgroundColor,
this.textColor,
this.placeholderColor,
this.showCancelButton = true,
this.cancelText = 'Cancel',
this.autofocus = false,
this.controller,
this.searchIcon,
this.clearIcon,
});