CustomTextField constructor
CustomTextField({
- Key? key,
- required TextEditingController controller,
- required String hintText,
- double? width,
- Color? cursorColor,
- bool isCollapsed = false,
- BoxBorder? border,
- List<
TextInputFormatter> ? inputFormatters, - TextInputAction? textInputAction,
- double? contentPaddingHorizontal,
- Iterable<
String> ? autofillHints, - Color? borderColor,
- BoxConstraints? prefixIconConstraints,
- BoxConstraints? suffixIconConstraints,
- int? maxLines,
- String? validator()?,
- int? maxLength,
- dynamic onSaved()?,
- double? fontSize,
- Color? textColor,
- TextCapitalization textCapitalization = TextCapitalization.none,
- double? hintTextFontSize,
- double? headingFontSize,
- String? headingText,
- String? subHeadingText,
- FontWeight? headingFontWeight,
- double? cursorHeight,
- bool? autofocus = false,
- bool readOnly = false,
- Widget? prefix,
- bool filled = true,
- double? contentPaddingVertical,
- double horizontalPadding = 0,
- double verticalPadding = 0,
- bool obscureText = false,
- Color? fillColor = MyColors.fillColor,
- Color? bgColor,
- Color? hintColor,
- double? borderRadius,
- TextInputType? keyboardType,
- dynamic onChanged()?,
- bool enabled = true,
- double headingSpace = 0,
- Widget? suffix,
- String? suffixText,
- Color? focusedBorderColor,
- String? prefixText,
- FocusNode? focusNode,
- bool enableInteractiveSelection = true,
- dynamic onTap()?,
- TextAlign textAlign = TextAlign.start,
- bool? showShadow = false,
- Color? headingColor,
- dynamic onTapOutside()?,
- dynamic onFieldSubmitted()?,
- 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;