InputControl constructor
const
InputControl({
- Key? key,
- String? label = 'Label',
- bool isRequired = false,
- int? characterLimit = 32,
- InputControlType type = InputControlType.gray,
- InputControlSize size = InputControlSize.defaultSize,
- bool hasUpSlot = false,
- Widget? upSlot,
- bool hasDownSlot = false,
- Widget? downSlot,
- IconData? leftIcon = Icons.face_5_outlined,
- Widget? leftIconWidget,
- String? prefix = 'Prefix',
- Widget? prefixWidget,
- String placeholder = 'Input',
- String? value,
- TextEditingController? controller,
- FocusNode? focusNode,
- bool isSelected = false,
- bool? isHovered,
- String? suffix = 'Suffix',
- Widget? suffixWidget,
- ButtonIconGhost? rightButton,
- bool obscureText = false,
- String obscuringCharacter = '•',
- int? maxLines = 1,
- int? minLines = 1,
- List<
TextInputFormatter> ? inputFormatters, - bool isError = false,
- bool showErrorMessage = true,
- String errorMessage = 'Error Message',
- List<
String> ? errorMessages, - Widget? errorIconWidget,
- bool enabled = true,
- bool readOnly = false,
- ValueChanged<
String> ? onChanged, - ValueChanged<
String> ? onSubmitted, - VoidCallback? onTap,
- TextInputType? keyboardType,
- TextInputAction textInputAction = TextInputAction.done,
- 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,
});