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. String? suffixSemanticLabel,
  9. bool enabled = true,
  10. bool readOnly = false,
  11. bool autofocus = false,
  12. ValueChanged<String>? onChanged,
  13. ValueChanged<String>? onSubmitted,
  14. List<TextInputFormatter>? inputFormatters,
  15. TextStyle? textStyle,
  16. TextStyle? placeholderStyle,
  17. EdgeInsetsGeometry padding = const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
  18. double iconSpacing = 8.0,
  19. double? height = 44.0,
  20. LiquidShape shape = const LiquidRoundedRectangle(borderRadius: 22),
  21. LiquidGlassSettings? settings,
  22. bool useOwnLayer = false,
  23. GlassQuality? quality,
  24. GlassInteractionBehavior interactionBehavior = GlassInteractionBehavior.full,
  25. double pressScale = 1.03,
  26. Color? glowColor,
  27. double glowRadius = 1.5,
  28. 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.suffixSemanticLabel,
  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;