ExTextField constructor

const ExTextField({
  1. Key? key,
  2. TextEditingController? controller,
  3. String? hint,
  4. String? value,
  5. bool clear = true,
  6. bool isPassword = false,
  7. bool obscureText = false,
  8. ExTextFieldBorderType borderType = ExTextFieldBorderType.underLine,
  9. int? maxLine = 1,
  10. int? maxLength,
  11. TextAlign textAlign = TextAlign.left,
  12. Color? fillColor = Colors.transparent,
  13. Color? borderColor = const Color(0xFFC7CBCF),
  14. Widget? prefixIcon,
  15. Widget? suffixIcon,
  16. double height = 40,
  17. double? borderRadius = 8,
  18. double? contentPaddingLeft = 12,
  19. double? contentPaddingRight,
  20. double? contentPaddingTop,
  21. TextInputType? keyboardType,
  22. TextInputAction? textInputAction,
  23. List<TextInputFormatter>? inputFormatters,
  24. ValueChanged<String>? onChanged,
  25. ValueChanged<String>? onSubmitted,
  26. VoidCallback? onEditingComplete,
  27. FocusNode? focusNode,
  28. String? counterText,
  29. bool autofocus = false,
  30. TextStyle? style,
  31. String? labelText,
  32. TextStyle? labelStyle = const TextStyle(fontSize: 14),
  33. String? helperText,
  34. TextStyle? helperStyle = const TextStyle(fontSize: 12),
  35. Color? cursorColor,
  36. bool autocorrect = true,
  37. double? cursorHeight,
  38. Radius? cursorRadius,
  39. double cursorWidth = 2.0,
  40. bool enableSuggestions = true,
  41. bool? enabled,
  42. bool? showCursor,
  43. dynamic onSaved(
    1. String?
    )?,
  44. String? validator(
    1. String?
    )?,
  45. AutovalidateMode? autovalidateMode,
  46. Color? borderColorFocus,
  47. String? initialValue,
  48. bool? readOnly,
  49. bool? isRequired,
  50. Function? clearCallback,
})

Implementation

const ExTextField({
  super.key,
  this.controller,
  this.hint,
  this.value,
  this.clear = true,
  this.isPassword = false,
  this.obscureText = false,
  this.borderType = ExTextFieldBorderType.underLine,
  this.maxLine = 1,
  this.maxLength,
  this.textAlign = TextAlign.left,
  this.fillColor = Colors.transparent,
  this.borderColor = const Color(0xFFC7CBCF),
  this.prefixIcon,
  this.suffixIcon,
  this.height = 40,
  this.borderRadius = 8,
  this.contentPaddingLeft = 12,
  this.contentPaddingRight,
  this.contentPaddingTop,
  this.keyboardType,
  this.textInputAction,
  this.inputFormatters,
  this.onChanged,
  this.onSubmitted,
  this.onEditingComplete,
  this.focusNode,
  this.counterText,
  this.autofocus = false,
  this.style,
  this.labelText,
  this.labelStyle = const TextStyle(fontSize: 14),
  this.helperText,
  this.helperStyle = const TextStyle(fontSize: 12),
  this.cursorColor,
  this.autocorrect = true,
  this.cursorHeight,
  this.cursorRadius,
  this.cursorWidth = 2.0,
  this.enableSuggestions = true,
  this.enabled,
  this.showCursor,
  this.onSaved,
  this.validator,
  this.autovalidateMode,
  this.borderColorFocus,
  this.initialValue,
  this.readOnly,
  this.isRequired,
  this.clearCallback,
});