CustomTextField constructor
const
CustomTextField({
- Key? key,
- String? label,
- String? hint,
- TextEditingController? controller,
- bool obscureText = false,
- TextInputType keyboardType = TextInputType.text,
- Widget? leadingIcon,
- Widget? trailingIcon,
- String? validator()?,
- List<
TextInputFormatter> ? inputFormatters, - void onChanged()?,
- FocusNode? focusNode,
- bool enabled = true,
- String? initialValue,
- int? maxLength,
- bool readOnly = false,
- void onTap()?,
- Color? cursorColor,
- BoxDecoration? decoration,
- InputDecoration? inputDecoration,
- TextStyle? textStyle,
- EdgeInsetsGeometry contentPadding = const EdgeInsets.symmetric(horizontal: 16, vertical: 16),
- TextCapitalization textCapitalization = TextCapitalization.none,
- AutovalidateMode? autovalidateMode = AutovalidateMode.onUserInteraction,
- TextInputAction? textInputAction,
- dynamic onFieldSubmitted()?,
- int? maxLines = 1,
- bool preventConsecutiveSpaces = true,
- bool preventLeadingTrailingSpaces = true,
- RegExp? inputFormatterPattern,
- bool useInputFormatter = true,
- bool? autofocus,
Implementation
const CustomTextField({
super.key,
this.label,
this.hint,
this.controller,
this.obscureText = false,
this.keyboardType = TextInputType.text,
this.leadingIcon,
this.trailingIcon,
this.validator,
this.inputFormatters,
this.onChanged,
this.focusNode,
this.enabled = true,
this.initialValue,
this.maxLength,
this.readOnly = false,
this.onTap,
this.cursorColor,
this.decoration,
this.inputDecoration,
this.textStyle,
this.contentPadding = const EdgeInsets.symmetric(
horizontal: 16,
vertical: 16,
),
this.textCapitalization = TextCapitalization.none,
this.autovalidateMode = AutovalidateMode.onUserInteraction,
this.textInputAction,
this.onFieldSubmitted,
this.maxLines = 1,
this.preventConsecutiveSpaces = true,
this.preventLeadingTrailingSpaces = true,
this.inputFormatterPattern,
this.useInputFormatter = true,
this.autofocus,
});