CInput constructor
const
CInput({
- Key? key,
- required String labelText,
- required TextEditingController controller,
- String? errorText,
- TextInputType keyboardType = TextInputType.text,
- Widget? prefixIcon,
- Widget? suffixIcon,
- String? prefixText,
- String? hintText,
- ValueChanged<
String> ? onChanged, - bool obscureText = false,
- bool readOnly = false,
- VoidCallback? onTap,
- FocusNode? focusNode,
- bool? enabled,
- List<
TextInputFormatter> ? inputFormatters, - TextInputAction? textInputAction,
- ValueChanged<
String> ? onSubmitted, - TextCapitalization? textCapitalization,
- TextStyle? prefixStyle,
- bool isRequired = false,
- Color? background,
- Color? textColor,
Implementation
const CInput({
super.key,
required this.labelText,
required this.controller,
this.errorText,
this.keyboardType = TextInputType.text,
this.prefixIcon,
this.suffixIcon,
this.prefixText,
this.hintText,
this.onChanged,
this.obscureText = false,
this.readOnly = false,
this.onTap,
this.focusNode,
this.enabled,
this.inputFormatters,
this.textInputAction,
this.onSubmitted,
this.textCapitalization,
// NEW PARAM
this.prefixStyle,
this.isRequired = false,
this.background,
this.textColor,
});