GlassTextField.search constructor

const GlassTextField.search({
  1. Key? key,
  2. TextEditingController? controller,
  3. FocusNode? focusNode,
  4. String? placeholder,
  5. Widget? prefixIcon,
  6. Widget? suffixIcon,
  7. VoidCallback? onSuffixTap,
  8. bool enabled = true,
  9. bool readOnly = false,
  10. bool autofocus = false,
  11. ValueChanged<String>? onChanged,
  12. ValueChanged<String>? onSubmitted,
  13. List<TextInputFormatter>? inputFormatters,
  14. TextStyle? textStyle,
  15. TextStyle? placeholderStyle,
  16. EdgeInsetsGeometry padding = const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
  17. double iconSpacing = 8.0,
  18. double? height = 44.0,
  19. LiquidShape shape = const LiquidRoundedRectangle(borderRadius: 22),
  20. LiquidGlassSettings? settings,
  21. bool useOwnLayer = false,
  22. GlassQuality? quality,
  23. GlassInteractionBehavior interactionBehavior = GlassInteractionBehavior.full,
  24. double pressScale = 1.03,
  25. Color? glowColor,
  26. double glowRadius = 1.5,
  27. TapRegionCallback? onTapOutside,
})

Creates a glass text field styled specifically for search, matching the compact layout and visuals of GlassSearchBar.

Implementation

const GlassTextField.search({
  super.key,
  this.controller,
  this.focusNode,
  this.placeholder,
  this.prefixIcon,
  this.suffixIcon,
  this.onSuffixTap,
  this.enabled = true,
  this.readOnly = false,
  this.autofocus = false,
  this.onChanged,
  this.onSubmitted,
  this.inputFormatters,
  this.textStyle,
  this.placeholderStyle,
  this.padding = const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
  this.iconSpacing = 8.0,
  this.height = 44.0,
  this.shape = const LiquidRoundedRectangle(borderRadius: 22),
  this.settings,
  this.useOwnLayer = false,
  this.quality,
  this.interactionBehavior = GlassInteractionBehavior.full,
  this.pressScale = 1.03,
  this.glowColor,
  this.glowRadius = 1.5,
  this.onTapOutside,
})  : obscureText = false,
      keyboardType = TextInputType.text,
      textInputAction = TextInputAction.search,
      maxLines = 1,
      minLines = 1,
      maxLength = null,
      onLineCountChanged = null,
      iconAlignment = CrossAxisAlignment.center,
      minHeight = null,
      maxHeight = null,
      bottom = null;