TTextField constructor

const TTextField({
  1. Key? key,
  2. String? labelText,
  3. required String hintText,
  4. required TextEditingController controller,
  5. required ValueChanged<String> onChange,
  6. ValueChanged<String>? onSubmitted,
  7. bool enableInstantDelete = false,
  8. int? maxLines = 1,
  9. int minLines = 1,
  10. TextInputType textInputType = TextInputType.text,
  11. Widget? leading,
  12. bool? enabled,
  13. bool readOnly = false,
  14. Color? borderColor,
  15. Color? focusedBorderColor,
  16. Widget? actionWidget,
  17. Color? hintColor,
  18. bool? autoFocus,
  19. FocusNode? focusNode,
  20. String? errorMessage,
  21. String? description,
  22. List<TextInputFormatter>? inputFormatter,
  23. double? height,
  24. Color? backgroundColor,
  25. String? helperText,
  26. VoidCallback? onEditingComplete,
  27. bool obscureText = false,
  28. String? counterText,
  29. Widget? passwordVisibilityIcon,
  30. Widget? passwordVisibilityOffIcon,
  31. bool showPasswordToggle = true,
  32. Widget? emailIcon,
  33. bool showEmailIcon = true,
  34. VoidCallback? onLeadingPressed,
  35. VoidCallback? onActionPressed,
})

Implementation

const TTextField({
  super.key,
  this.labelText,
  required this.hintText,
  required this.controller,
  required this.onChange,
  this.onSubmitted,
  this.enableInstantDelete = false,
  this.maxLines = 1,
  this.minLines = 1,
  this.textInputType = TextInputType.text,
  this.leading,
  this.enabled,
  this.readOnly = false,
  this.borderColor,
  this.focusedBorderColor,
  this.actionWidget,
  this.hintColor,
  this.autoFocus,
  this.focusNode,
  this.errorMessage,
  this.description,
  this.inputFormatter,
  this.height,
  this.backgroundColor,
  this.helperText,
  this.onEditingComplete,
  this.obscureText = false,
  this.counterText,
  this.passwordVisibilityIcon,
  this.passwordVisibilityOffIcon,
  this.showPasswordToggle = true,
  this.emailIcon,
  this.showEmailIcon = true,
  this.onLeadingPressed,
  this.onActionPressed,
}) : type = TextFieldType.defaultType;