InputControl constructor

const InputControl({
  1. Key? key,
  2. String? label = 'Label',
  3. bool isRequired = false,
  4. int? characterLimit = 32,
  5. InputControlType type = InputControlType.gray,
  6. InputControlSize size = InputControlSize.defaultSize,
  7. bool hasUpSlot = false,
  8. Widget? upSlot,
  9. bool hasDownSlot = false,
  10. Widget? downSlot,
  11. IconData? leftIcon = Icons.face_5_outlined,
  12. Widget? leftIconWidget,
  13. String? prefix = 'Prefix',
  14. Widget? prefixWidget,
  15. String placeholder = 'Input',
  16. String? value,
  17. TextEditingController? controller,
  18. FocusNode? focusNode,
  19. bool isSelected = false,
  20. bool? isHovered,
  21. String? suffix = 'Suffix',
  22. Widget? suffixWidget,
  23. ButtonIconGhost? rightButton,
  24. bool obscureText = false,
  25. String obscuringCharacter = '•',
  26. int? maxLines = 1,
  27. int? minLines = 1,
  28. List<TextInputFormatter>? inputFormatters,
  29. bool isError = false,
  30. bool showErrorMessage = true,
  31. String errorMessage = 'Error Message',
  32. List<String>? errorMessages,
  33. Widget? errorIconWidget,
  34. bool enabled = true,
  35. bool readOnly = false,
  36. ValueChanged<String>? onChanged,
  37. ValueChanged<String>? onSubmitted,
  38. VoidCallback? onTap,
  39. TextInputType? keyboardType,
  40. TextInputAction textInputAction = TextInputAction.done,
  41. bool autofocus = false,
})

Creates an InputControl instance.

Implementation

const InputControl({
  super.key,
  this.label = 'Label',
  this.isRequired = false,
  this.characterLimit = 32,
  this.type = InputControlType.gray,
  this.size = InputControlSize.defaultSize,
  this.hasUpSlot = false,
  this.upSlot,
  this.hasDownSlot = false,
  this.downSlot,
  this.leftIcon = Icons.face_5_outlined,
  this.leftIconWidget,
  this.prefix = 'Prefix',
  this.prefixWidget,
  this.placeholder = 'Input',
  this.value,
  this.controller,
  this.focusNode,
  this.isSelected = false,
  this.isHovered,
  this.suffix = 'Suffix',
  this.suffixWidget,
  this.rightButton,
  this.obscureText = false,
  this.obscuringCharacter = '•',
  this.maxLines = 1,
  this.minLines = 1,
  this.inputFormatters,
  this.isError = false,
  this.showErrorMessage = true,
  this.errorMessage = 'Error Message',
  this.errorMessages,
  this.errorIconWidget,
  this.enabled = true,
  this.readOnly = false,
  this.onChanged,
  this.onSubmitted,
  this.onTap,
  this.keyboardType,
  this.textInputAction = TextInputAction.done,
  this.autofocus = false,
});