CustomTextField constructor

CustomTextField({
  1. Key? key,
  2. required TextEditingController controller,
  3. required String hintText,
  4. double? width,
  5. Color? cursorColor,
  6. bool isCollapsed = false,
  7. BoxBorder? border,
  8. List<TextInputFormatter>? inputFormatters,
  9. TextInputAction? textInputAction,
  10. double? contentPaddingHorizontal,
  11. Iterable<String>? autofillHints,
  12. Color? borderColor,
  13. BoxConstraints? prefixIconConstraints,
  14. BoxConstraints? suffixIconConstraints,
  15. int? maxLines,
  16. String? validator(
    1. String?
    )?,
  17. int? maxLength,
  18. dynamic onSaved(
    1. String?
    )?,
  19. double? fontSize,
  20. Color? textColor,
  21. TextCapitalization textCapitalization = TextCapitalization.none,
  22. double? hintTextFontSize,
  23. double? headingFontSize,
  24. String? headingText,
  25. String? subHeadingText,
  26. FontWeight? headingFontWeight,
  27. double? cursorHeight,
  28. bool? autofocus = false,
  29. bool readOnly = false,
  30. Widget? prefix,
  31. bool filled = true,
  32. double? contentPaddingVertical,
  33. double horizontalPadding = 0,
  34. double verticalPadding = 0,
  35. bool obscureText = false,
  36. Color? fillColor = MyColors.fillColor,
  37. Color? bgColor,
  38. Color? hintColor,
  39. double? borderRadius,
  40. TextInputType? keyboardType,
  41. dynamic onChanged(
    1. String
    )?,
  42. bool enabled = true,
  43. double headingSpace = 0,
  44. Widget? suffix,
  45. String? suffixText,
  46. Color? focusedBorderColor,
  47. String? prefixText,
  48. FocusNode? focusNode,
  49. bool enableInteractiveSelection = true,
  50. dynamic onTap()?,
  51. TextAlign textAlign = TextAlign.start,
  52. bool? showShadow = false,
  53. Color? headingColor,
  54. dynamic onTapOutside(
    1. PointerDownEvent
    )?,
  55. dynamic onFieldSubmitted(
    1. String
    )?,
  56. dynamic onEditingComplete()?,
})

this is the constructor of the CustomTextField

Implementation

CustomTextField({
  super.key,
  required this.controller,
  required this.hintText,
  this.width,
  this.cursorColor,
  this.isCollapsed = false,
  this.border,
  this.inputFormatters,
  this.textInputAction,
  this.contentPaddingHorizontal,
  this.autofillHints,
  this.borderColor,
  this.prefixIconConstraints,
  this.suffixIconConstraints,
  this.maxLines,
  this.validator,
  this.maxLength,
  this.onSaved,
  this.fontSize,
  this.textColor,
  this.textCapitalization = TextCapitalization.none,
  this.hintTextFontSize,
  this.headingFontSize,
  this.headingText,
  this.subHeadingText,
  this.headingFontWeight,
  this.cursorHeight,
  this.autofocus = false,
  this.readOnly = false,
  this.prefix,
  this.filled = true,
  this.contentPaddingVertical,
  this.horizontalPadding = 0,
  this.verticalPadding = 0,
  this.obscureText = false,
  this.fillColor = MyColors.fillColor,
  this.bgColor,
  this.hintColor,
  double? borderRadius,
  this.keyboardType,
  this.onChanged,
  this.enabled = true,
  this.headingSpace = 0,
  this.suffix,
  this.suffixText,
  this.focusedBorderColor,
  this.prefixText,
  this.focusNode,
  this.enableInteractiveSelection = true,
  this.onTap,
  this.textAlign = TextAlign.start,
  this.showShadow = false,
  this.headingColor,
  this.onTapOutside,
  this.onFieldSubmitted,
  this.onEditingComplete,
}) : borderRadius = borderRadius ?? CustomStylesConfig.globalBorderRadius;