SearchInput constructor

const SearchInput({
  1. Key? key,
  2. String? label,
  3. bool isRequired = false,
  4. int? characterLimit,
  5. InputControlType type = InputControlType.gray,
  6. IconData? leftIcon = Icons.search_rounded,
  7. Widget? leftIconWidget,
  8. String? prefix,
  9. Widget? prefixWidget,
  10. String placeholder = 'Search...',
  11. String? value,
  12. TextEditingController? controller,
  13. FocusNode? focusNode,
  14. String? suffix,
  15. Widget? suffixWidget,
  16. bool showClearButton = true,
  17. ButtonIconGhost? customRightButton,
  18. bool isError = false,
  19. bool showErrorMessage = true,
  20. String errorMessage = 'Error Message',
  21. List<String>? errorMessages,
  22. Widget? errorIconWidget,
  23. bool enabled = true,
  24. bool readOnly = false,
  25. bool autofocus = false,
  26. ValueChanged<String>? onChanged,
  27. ValueChanged<String>? onSubmitted,
  28. ValueChanged<String>? onSearch,
  29. VoidCallback? onClear,
  30. VoidCallback? onTap,
})

Creates a SearchInput instance.

Implementation

const SearchInput({
  super.key,
  this.label,
  this.isRequired = false,
  this.characterLimit,
  this.type = InputControlType.gray,
  this.leftIcon = Icons.search_rounded,
  this.leftIconWidget,
  this.prefix,
  this.prefixWidget,
  this.placeholder = 'Search...',
  this.value,
  this.controller,
  this.focusNode,
  this.suffix,
  this.suffixWidget,
  this.showClearButton = true,
  this.customRightButton,
  this.isError = false,
  this.showErrorMessage = true,
  this.errorMessage = 'Error Message',
  this.errorMessages,
  this.errorIconWidget,
  this.enabled = true,
  this.readOnly = false,
  this.autofocus = false,
  this.onChanged,
  this.onSubmitted,
  this.onSearch,
  this.onClear,
  this.onTap,
});