onTextFormField method

TextFormField onTextFormField({
  1. TextEditingController? controller,
  2. String? initialValue,
  3. FocusNode? focusNode,
  4. InputDecoration? inputDecoration,
  5. TextInputType? keyboardType,
  6. TextCapitalization? textCapitalization,
  7. TextInputAction? textInputAction,
  8. TextStyle? style,
  9. TextAlign? textAlign,
  10. bool? autofocus,
  11. bool? obscureText,
  12. bool? autocorrect,
  13. bool? autovalidate,
  14. MaxLengthEnforcement? maxLengthEnforcement,
  15. int? maxLines,
  16. int? maxLength,
  17. VoidCallback? editingComplete,
  18. ValueChanged<String>? fieldSubmitted,
  19. FormFieldSetter<String>? saved,
  20. FormFieldValidator<String>? validator,
  21. List<TextInputFormatter>? inputFormatters,
  22. bool? enabled,
  23. Brightness? keyboardAppearance,
  24. EdgeInsets? scrollPadding,
  25. InputCounterWidgetBuilder? buildCounter,
  26. ScrollPhysics? scrollPhysics,
  27. Iterable<String>? autofillHints,
  28. AutovalidateMode? autovalidateMode,
  29. 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;
}