onTextFormField method
TextFormField
onTextFormField({
- TextEditingController? controller,
- String? initialValue,
- FocusNode? focusNode,
- InputDecoration? inputDecoration,
- TextInputType? keyboardType,
- TextCapitalization? textCapitalization,
- TextInputAction? textInputAction,
- TextStyle? style,
- TextAlign? textAlign,
- bool? autofocus,
- bool? obscureText,
- bool? autocorrect,
- bool? autovalidate,
- MaxLengthEnforcement? maxLengthEnforcement,
- int? maxLines,
- int? maxLength,
- VoidCallback? editingComplete,
- ValueChanged<
String> ? fieldSubmitted, - FormFieldSetter<
String> ? saved, - FormFieldValidator<
String> ? validator, - List<
TextInputFormatter> ? inputFormatters, - bool? enabled,
- Brightness? keyboardAppearance,
- EdgeInsets? scrollPadding,
- InputCounterWidgetBuilder? buildCounter,
- ScrollPhysics? scrollPhysics,
- Iterable<
String> ? autofillHints, - AutovalidateMode? autovalidateMode,
- bool create = false,
Implementation
m.TextFormField onTextFormField({
TextEditingController? controller,
String? initialValue,
FocusNode? focusNode,
InputDecoration? inputDecoration,
TextInputType? keyboardType,
TextCapitalization? textCapitalization,
TextInputAction? textInputAction,
TextStyle? style,
TextAlign? textAlign,
bool? autofocus,
bool? obscureText,
bool? autocorrect,
bool? autovalidate,
// bool? maxLengthEnforced,
MaxLengthEnforcement? maxLengthEnforcement,
int? maxLines,
int? maxLength,
VoidCallback? editingComplete,
ValueChanged<String>? fieldSubmitted,
FormFieldSetter<String>? saved,
FormFieldValidator<String>? validator,
List<TextInputFormatter>? inputFormatters,
bool? enabled,
Brightness? keyboardAppearance,
EdgeInsets? scrollPadding,
InputCounterWidgetBuilder? buildCounter,
ScrollPhysics? scrollPhysics,
Iterable<String>? autofillHints,
AutovalidateMode? autovalidateMode,
bool create = false,
}) {
this.controller = controller ?? this.controller;
this.initialValue = initialValue ?? this.initialValue;
this.focusNode = focusNode ?? this.focusNode;
this.inputDecoration = inputDecoration ?? this.inputDecoration;
this.keyboardType = keyboardType ?? this.keyboardType;
this.textCapitalization = textCapitalization ?? this.textCapitalization;
this.textInputAction = textInputAction ?? this.textInputAction;
this.style = style ?? this.style;
this.textAlign = textAlign ?? this.textAlign;
this.autofocus = autofocus ?? this.autofocus;
this.obscureText = obscureText ?? this.obscureText;
this.autocorrect = autocorrect ?? this.autocorrect;
// this.autovalidate = autovalidate ?? this.autovalidate;
// this.maxLengthEnforced = maxLengthEnforced ?? this.maxLengthEnforced;
this.maxLengthEnforcement =
maxLengthEnforcement ?? this.maxLengthEnforcement;
this.maxLines = maxLines ?? this.maxLines;
this.maxLength = maxLength ?? this.maxLength;
this.editingComplete = editingComplete ?? this.editingComplete;
this.fieldSubmitted = fieldSubmitted ?? this.fieldSubmitted;
this.saved = saved ?? this.saved;
this.validator = validator ?? this.validator;
this.inputFormatters = inputFormatters ?? this.inputFormatters;
this.enabled = enabled ?? this.enabled;
this.keyboardAppearance = keyboardAppearance ?? this.keyboardAppearance;
this.scrollPadding = scrollPadding ?? this.scrollPadding;
this.buildCounter = buildCounter ?? this.buildCounter;
this.scrollPhysics = scrollPhysics ?? this.scrollPhysics;
this.autofillHints = autofillHints ?? this.autofillHints;
this.autovalidateMode = autovalidateMode ?? this.autovalidateMode;
final oldWidget = _textFormField;
_textFormField = null;
final newWidget = textFormField;
_textFormField = oldWidget;
return newWidget as m.TextFormField;
}