From d88ff90753879010d78ccb32579f32d6d76b808c Mon Sep 17 00:00:00 2001 From: Adam Barth Date: Mon, 3 Apr 2017 20:58:32 -0700 Subject: [PATCH] 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 --- packages/flutter/lib/src/material/text_form_field.dart | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/flutter/lib/src/material/text_form_field.dart b/packages/flutter/lib/src/material/text_form_field.dart index 456cab387f..ee08e6e6fc 100644 --- a/packages/flutter/lib/src/material/text_form_field.dart +++ b/packages/flutter/lib/src/material/text_form_field.dart @@ -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: /// /// * @@ -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 { + /// 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 { autofocus: autofocus, obscureText: obscureText, maxLines: maxLines, - onChanged: (String value) { - field.onChanged(value); - }, + onChanged: field.onChanged, ); }, );