Unverified Commit 9b6229ab authored by Hans Muller's avatar Hans Muller Committed by GitHub

TextField.onChanged() doc update (#25473)

parent cbb168e7
...@@ -297,6 +297,13 @@ class TextField extends StatefulWidget { ...@@ -297,6 +297,13 @@ class TextField extends StatefulWidget {
final bool maxLengthEnforced; final bool maxLengthEnforced;
/// {@macro flutter.widgets.editableText.onChanged} /// {@macro flutter.widgets.editableText.onChanged}
///
/// See also:
///
/// * [inputFormatters], which are called before [onChanged]
/// runs and can validate and change ("format") the input value.
/// * [onEditingComplete], [onSubmitted], [onSelectionChanged]:
/// which are more specialized input change notifications.
final ValueChanged<String> onChanged; final ValueChanged<String> onChanged;
/// {@macro flutter.widgets.editableText.onEditingComplete} /// {@macro flutter.widgets.editableText.onEditingComplete}
......
...@@ -374,8 +374,25 @@ class EditableText extends StatefulWidget { ...@@ -374,8 +374,25 @@ class EditableText extends StatefulWidget {
final TextInputAction textInputAction; final TextInputAction textInputAction;
/// {@template flutter.widgets.editableText.onChanged} /// {@template flutter.widgets.editableText.onChanged}
/// Called when the text being edited changes. /// Called when the user initiates a change to the TextField's
/// value: when they have inserted or deleted text.
///
/// This callback does run not when the TextField's text is changed
/// programmatically, via the TextField's [controller]. Typically it
/// isn't necessary to be notified of such changes, since they're
/// initiated by the app itself.
///
/// To be notified of all changes to the TextField's text, cursor,
/// and selection, one can add a listener to its [controller] with
/// [TextEditingController.addListener].
/// {@endtemplate} /// {@endtemplate}
///
/// See also:
///
/// * [inputFormatters], which are called before [onChanged]
/// runs and can validate and change ("format") the input value.
/// * [onEditingComplete], [onSubmitted], [onSelectionChanged]:
/// which are more specialized input change notifications.
final ValueChanged<String> onChanged; final ValueChanged<String> onChanged;
/// {@template flutter.widgets.editableText.onEditingComplete} /// {@template flutter.widgets.editableText.onEditingComplete}
......
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