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 autofocus = false,
  10. bool enabled = true,
  11. Color? searchIconColor,
  12. Color? clearIconColor,
  13. Color? cancelButtonColor,
  14. Widget? cancelIcon,
  15. double cancelIconSize = 24,
  16. TextStyle? textStyle,
  17. TextStyle? placeholderStyle,
  18. double height = 44.0,
  19. LiquidGlassSettings? settings,
  20. bool useOwnLayer = false,
  21. GlassQuality? quality,
  22. String? clearButtonSemanticLabel,
  23. 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.autofocus = false,
  this.enabled = true,
  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.clearButtonSemanticLabel,
  this.cancelButtonSemanticLabel,
});