Commit d88ff907 authored by Adam Barth's avatar Adam Barth Committed by GitHub

Defer to TextField in TextFormField docs (#9144)

TextFormField doesn't actually have many properties because it wraps a
TextField. Rather than trying to document all the arguments in the
constructor, we now refer to the docs for TextField, which explain the
parameters in a more readable way.

Fixes #7245
parent f00b3a4b
......@@ -18,6 +18,8 @@ import 'text_field.dart';
/// pass a [GlobalKey] to the constructor and use [GlobalKey.currentState] to
/// save or reset the form field.
///
/// For a documentation about the various parameters, see [TextField].
///
/// See also:
///
/// * <https://material.google.com/components/text-fields.html>
......@@ -26,6 +28,9 @@ import 'text_field.dart';
/// * [InputDecorator], which shows the labels and other visual elements that
/// surround the actual text editing widget.
class TextFormField extends FormField<String> {
/// Creates a [FormField] that contains a [TextField].
///
/// For a documentation about the various parameters, see [TextField].
TextFormField({
Key key,
TextEditingController controller,
......@@ -53,9 +58,7 @@ class TextFormField extends FormField<String> {
autofocus: autofocus,
obscureText: obscureText,
maxLines: maxLines,
onChanged: (String value) {
field.onChanged(value);
},
onChanged: field.onChanged,
);
},
);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment