GlassSearchBarConfig constructor
const
GlassSearchBarConfig({
- required ValueChanged<
bool> onSearchToggle, - String hintText = 'Search',
- double? collapsedTabWidth,
- WidgetBuilder? collapsedLogoBuilder,
- Color? searchIconColor,
- Widget? searchIcon,
- Color? micIconColor,
- TextStyle? hintStyle,
- TextEditingController? controller,
- FocusNode? focusNode,
- ValueChanged<
String> ? onChanged, - ValueChanged<
String> ? onSubmitted, - VoidCallback? onMicTap,
- Color? textColor,
- Color? cursorColor,
- WidgetBuilder? trailingBuilder,
- TextInputAction? textInputAction,
- TextInputType? keyboardType,
- bool autocorrect = true,
- bool enableSuggestions = true,
- TapRegionCallback? onTapOutside,
- bool autoFocusOnExpand = false,
- bool expandWhenActive = true,
- bool showsCancelButton = true,
- Color? cancelButtonColor,
- Widget? cancelIcon,
- double cancelIconSize = 24,
- ValueChanged<
bool> ? onSearchFocusChanged, - VoidCallback? onSearchFieldTap,
- VoidCallback? onCancelTap,
Creates a search bar configuration.
Implementation
const GlassSearchBarConfig({
required this.onSearchToggle,
this.hintText = 'Search',
this.collapsedTabWidth,
this.collapsedLogoBuilder,
this.searchIconColor,
this.searchIcon,
this.micIconColor,
this.hintStyle,
this.controller,
this.focusNode,
this.onChanged,
this.onSubmitted,
this.onMicTap,
this.textColor,
this.cursorColor,
this.trailingBuilder,
this.textInputAction,
this.keyboardType,
this.autocorrect = true,
this.enableSuggestions = true,
this.onTapOutside,
this.autoFocusOnExpand = false,
this.expandWhenActive = true,
this.showsCancelButton = true,
this.cancelButtonColor,
this.cancelIcon,
this.cancelIconSize = 24,
this.onSearchFocusChanged,
this.onSearchFieldTap,
this.onCancelTap,
});