mirror of
https://github.com/flutter/flutter
synced 2024-08-24 18:36:03 +00:00
Small fixes in TextEditingController docs (#143717)
This follows up on #143452, to slightly further address #95978. The double- rather than triple-slash on the blank line caused it to be ignored by dartdoc, so that the two paragraphs it's intended to separate were getting joined as one paragraph instead. Also expand this constructor's summary line slightly to mention its distinctive feature compared with the other constructor, and make other small fixes that I noticed in other docs on this class.
This commit is contained in:
parent
f2eea969f7
commit
2d422a3261
|
@ -173,7 +173,7 @@ class _RenderCompositionCallback extends RenderProxyBox {
|
|||
/// between the framework and the input method. Consider using
|
||||
/// [TextInputFormatter]s instead for as-you-type text modification.
|
||||
///
|
||||
/// If both the [text] or [selection] properties need to be changed, set the
|
||||
/// If both the [text] and [selection] properties need to be changed, set the
|
||||
/// controller's [value] instead.
|
||||
///
|
||||
/// Remember to [dispose] of the [TextEditingController] when it is no longer
|
||||
|
@ -195,7 +195,7 @@ class _RenderCompositionCallback extends RenderProxyBox {
|
|||
/// controlled with a [TextEditingController].
|
||||
/// * Learn how to use a [TextEditingController] in one of our [cookbook recipes](https://flutter.dev/docs/cookbook/forms/text-field-changes#2-use-a-texteditingcontroller).
|
||||
class TextEditingController extends ValueNotifier<TextEditingValue> {
|
||||
/// Creates a controller for an editable text field.
|
||||
/// Creates a controller for an editable text field, with no initial selection.
|
||||
///
|
||||
/// This constructor treats a null [text] argument as if it were the empty
|
||||
/// string.
|
||||
|
@ -206,7 +206,7 @@ class TextEditingController extends ValueNotifier<TextEditingValue> {
|
|||
/// selection is not valid, the text field will update the selection when it
|
||||
/// is focused (the selection will be an empty selection positioned at the
|
||||
/// end of the text).
|
||||
//
|
||||
///
|
||||
/// Consider using [TextEditingController.fromValue] to initialize both the
|
||||
/// text and the selection.
|
||||
///
|
||||
|
@ -293,7 +293,7 @@ class TextEditingController extends ValueNotifier<TextEditingValue> {
|
|||
);
|
||||
}
|
||||
|
||||
/// The currently selected [text].
|
||||
/// The currently selected range within [text].
|
||||
///
|
||||
/// If the selection is collapsed, then this property gives the offset of the
|
||||
/// cursor within the text.
|
||||
|
|
Loading…
Reference in a new issue