GlassSearchBar constructor

const GlassSearchBar({
  1. Key? key,
  2. TextEditingController? controller,
  3. FocusNode? focusNode,
  4. String placeholder = 'Search',
  5. ValueChanged<String>? onChanged,
  6. ValueChanged<String>? onSubmitted,
  7. VoidCallback? onCancel,
  8. bool showsCancelButton = false,
  9. bool cancelButtonAlwaysVisible = false,
  10. bool autofocus = false,
  11. bool enabled = true,
  12. bool autocorrect = true,
  13. bool enableSuggestions = true,
  14. TextSelectionControls? selectionControls,
  15. Color? searchIconColor,
  16. Color? clearIconColor,
  17. Color? cancelButtonColor,
  18. Widget? cancelIcon,
  19. double cancelIconSize = 24,
  20. TextStyle? textStyle,
  21. TextStyle? placeholderStyle,
  22. double height = 44.0,
  23. LiquidGlassSettings? settings,
  24. bool useOwnLayer = false,
  25. GlassQuality? quality,
  26. GlassSurfaceStyle? surfaceStyle,
  27. Color? color,
  28. String? clearButtonSemanticLabel,
  29. String? cancelButtonSemanticLabel,
})

Creates a glass search bar.

Implementation

const GlassSearchBar({
  super.key,
  this.controller,
  this.focusNode,
  this.placeholder = 'Search',
  this.onChanged,
  this.onSubmitted,
  this.onCancel,
  this.showsCancelButton = false,
  this.cancelButtonAlwaysVisible = false,
  this.autofocus = false,
  this.enabled = true,
  this.autocorrect = true,
  this.enableSuggestions = true,
  this.selectionControls,
  this.searchIconColor,
  this.clearIconColor,
  this.cancelButtonColor,
  this.cancelIcon,
  this.cancelIconSize = 24,
  this.textStyle,
  this.placeholderStyle,
  this.height = 44.0,
  this.settings,
  this.useOwnLayer = false,
  this.quality,
  this.surfaceStyle,
  this.color,
  this.clearButtonSemanticLabel,
  this.cancelButtonSemanticLabel,
});