SearchTextField constructor

const SearchTextField({
  1. Key? key,
  2. TextEditingController? controller,
  3. ValueChanged<String>? onChanged,
  4. ValueChanged<String>? onSubmitted,
  5. TextStyle? style,
  6. String? placeholder,
  7. TextStyle? placeholderStyle,
  8. BoxDecoration? decoration,
  9. Color? backgroundColor,
  10. TextInputType? keyboardType = TextInputType.text,
  11. EdgeInsetsGeometry padding = EdgeInsets.zero,
  12. Color? itemColor,
  13. double itemSize = 20.0,
  14. EdgeInsetsGeometry prefixInsets = const EdgeInsetsDirectional.only(start: 4.0),
  15. Widget prefixIcon = const Icon(Icons.search),
  16. OverlayVisibilityMode suffixMode = OverlayVisibilityMode.editing,
  17. EdgeInsetsGeometry suffixInsets = const EdgeInsetsDirectional.only(end: 4.0),
  18. Icon suffixIcon = const Icon(Icons.clear),
  19. VoidCallback? onPrefixTap,
  20. VoidCallback? onSuffixTap,
  21. FocusNode? focusNode,
  22. bool enableIMEPersonalizedLearning = true,
  23. bool autofocus = false,
  24. VoidCallback? onTap,
  25. bool autocorrect = true,
  26. bool? enabled,
})

Creates a SearchTextField.

Implementation

const SearchTextField({
  super.key,
  this.controller,
  this.onChanged,
  this.onSubmitted,
  this.style,
  this.placeholder,
  this.placeholderStyle,
  this.decoration,
  this.backgroundColor,
  this.keyboardType = TextInputType.text,
  this.padding = EdgeInsets.zero,
  this.itemColor,
  this.itemSize = 20.0,
  this.prefixInsets = const EdgeInsetsDirectional.only(start: 4.0),
  this.prefixIcon = const Icon(Icons.search),
  this.suffixMode = OverlayVisibilityMode.editing,
  this.suffixInsets = const EdgeInsetsDirectional.only(end: 4.0),
  this.suffixIcon = const Icon(Icons.clear),
  this.onPrefixTap,
  this.onSuffixTap,
  this.focusNode,
  this.enableIMEPersonalizedLearning = true,
  this.autofocus = false,
  this.onTap,
  this.autocorrect = true,
  this.enabled,
});