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. IconData? leftIcon = Icons.face_5_outlined,
  7. Widget? leftIconWidget,
  8. String? prefix = 'Prefix',
  9. Widget? prefixWidget,
  10. String placeholder = 'Input',
  11. String? value,
  12. TextEditingController? controller,
  13. FocusNode? focusNode,
  14. String? suffix = 'Suffix',
  15. Widget? suffixWidget,
  16. ButtonIconGhost? rightButton,
  17. bool obscureText = false,
  18. String obscuringCharacter = '•',
  19. int? maxLines = 1,
  20. int? minLines = 1,
  21. List<TextInputFormatter>? inputFormatters,
  22. bool isError = false,
  23. bool showErrorMessage = true,
  24. String errorMessage = 'Error Message',
  25. List<String>? errorMessages,
  26. Widget? errorIconWidget,
  27. bool enabled = true,
  28. bool readOnly = false,
  29. ValueChanged<String>? onChanged,
  30. ValueChanged<String>? onSubmitted,
  31. VoidCallback? onTap,
  32. TextInputType? keyboardType,
  33. TextInputAction textInputAction = TextInputAction.done,
  34. 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.leftIcon = Icons.face_5_outlined,
  this.leftIconWidget,
  this.prefix = 'Prefix',
  this.prefixWidget,
  this.placeholder = 'Input',
  this.value,
  this.controller,
  this.focusNode,
  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,
});