CustomTextField constructor
const
CustomTextField({
- bool? enabled,
- bool? obscureText,
- Key? formFieldKey,
- FocusNode? focusNode,
- String? fieldLabel,
- TextEditingController? controller,
- OnChangedString? onChanged,
- String? hintText,
- Color? hintColor,
- OnChangedString? onSubmitted,
- Color? customFillColor,
- int? maxLines,
- String? labelText,
- Widget? suffixIcon,
- Widget? prefixIcon,
- Color? borderColor,
- TextInputType? keyboardType,
- FormFieldValidator<
String> ? validator, - List<
TextInputFormatter> ? inputFormatters, - int? maxLength,
- bool? isRequired,
- AutovalidateMode? autovalidateMode,
- TextStyle? labelStyle,
- Color? focusedBorderColor,
- String? initialValue,
A wrapper for TextFormField that contains options for a field label.
For the label to appear the fieldLabel must be specified. If fieldLabel is specified and isRequired is true, then a red asterisk is added to the label.
For a documentation about the various parameters, see TextFormField.
Implementation
const CustomTextField({
bool? enabled,
bool? obscureText,
this.formFieldKey,
this.focusNode,
this.fieldLabel,
this.controller,
this.onChanged,
this.hintText,
this.hintColor,
this.onSubmitted,
this.customFillColor,
this.maxLines,
this.labelText,
this.suffixIcon,
this.prefixIcon,
this.borderColor,
this.keyboardType,
this.validator,
this.inputFormatters,
this.maxLength,
this.isRequired,
this.autovalidateMode,
this.labelStyle,
this.focusedBorderColor,
this.initialValue,
}) : enabled = enabled ?? true,
obscureText = obscureText ?? false;