CInput constructor

const CInput({
  1. Key? key,
  2. required String labelText,
  3. required TextEditingController controller,
  4. String? errorText,
  5. TextInputType keyboardType = TextInputType.text,
  6. Widget? prefixIcon,
  7. Widget? suffixIcon,
  8. String? prefixText,
  9. String? hintText,
  10. ValueChanged<String>? onChanged,
  11. bool obscureText = false,
  12. bool readOnly = false,
  13. VoidCallback? onTap,
  14. FocusNode? focusNode,
  15. bool? enabled,
  16. List<TextInputFormatter>? inputFormatters,
  17. TextInputAction? textInputAction,
  18. ValueChanged<String>? onSubmitted,
  19. TextCapitalization? textCapitalization,
  20. TextStyle? prefixStyle,
  21. bool isRequired = false,
  22. Color? background,
  23. 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,
});