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. double? contentPaddingHorizontal,
  10. Color? borderColor,
  11. BoxConstraints? prefixIconConstraints,
  12. BoxConstraints? suffixIconConstraints,
  13. int? maxLines,
  14. String? validator(
    1. String?
    )?,
  15. int? maxLength,
  16. dynamic onSaved(
    1. String?
    )?,
  17. double? fontSize,
  18. Color? textColor,
  19. TextCapitalization textCapitalization = TextCapitalization.none,
  20. double? hintTextFontSize,
  21. double? headingFontSize,
  22. String? headingText,
  23. String? subHeadingText,
  24. FontWeight? headingFontWeight,
  25. double? cursorHeight,
  26. bool? autofocus = false,
  27. bool readOnly = false,
  28. Widget? prefix,
  29. bool filled = true,
  30. double? contentPaddingVertical,
  31. double horizontalPadding = 0,
  32. double verticalPadding = 0,
  33. bool obscureText = false,
  34. Color? fillColor = MyColors.fillColor,
  35. Color? bgColor,
  36. Color? hintColor,
  37. double? borderRadius,
  38. TextInputType? keyboardType,
  39. dynamic onChanged(
    1. String
    )?,
  40. bool enabled = true,
  41. Widget? suffix,
  42. String? suffixText,
  43. Color? focusedBorderColor,
  44. String? prefixText,
  45. FocusNode? focusNode,
  46. bool enableInteractiveSelection = true,
  47. dynamic onTap()?,
  48. TextAlign textAlign = TextAlign.left,
  49. bool? showShadow = false,
  50. Color? headingColor,
  51. dynamic onTapOutside(
    1. PointerDownEvent
    )?,
})

Implementation

CustomTextField({
  super.key,
  required this.controller,
  required this.hintText,
  this.width,
  this.cursorColor,
  this.isCollapsed = false,
  this.border,
  this.inputFormatters,
  this.contentPaddingHorizontal,
  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.suffix,
  this.suffixText,
  this.focusedBorderColor,
  this.prefixText,
  this.focusNode,
  this.enableInteractiveSelection = true,
  this.onTap,
  this.textAlign = TextAlign.left,
  this.showShadow = false,
  this.headingColor,
  this.onTapOutside,
}) : borderRadius = borderRadius ?? CustomStylesConfig.globalBorderRadius;