Skip to content

Commit a57f45e

Browse files
authored
Revert "More EditableText docs (flutter#66864)" (flutter#68025)
This reverts commit daa6b2c.
1 parent 62cf4db commit a57f45e

File tree

3 files changed

+107
-431
lines changed

3 files changed

+107
-431
lines changed

packages/flutter/lib/src/services/text_input.dart

Lines changed: 3 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -756,17 +756,7 @@ abstract class TextSelectionDelegate {
756756
/// Gets the current text input.
757757
TextEditingValue get textEditingValue;
758758

759-
/// Indicates that the user has requested the delegate to replace its current
760-
/// text editing state with [value].
761-
///
762-
/// The new [value] is treated as user input and thus may subject to input
763-
/// formatting.
764-
///
765-
/// See also:
766-
///
767-
/// * [EditableTextState.textEditingValue]: an implementation that applies
768-
/// additional pre-processing to the specified [value], before updating the
769-
/// text editing state.
759+
/// Sets the current text input (replaces the whole line).
770760
set textEditingValue(TextEditingValue value);
771761

772762
/// Hides the text selection toolbar.
@@ -794,7 +784,6 @@ abstract class TextSelectionDelegate {
794784
/// See also:
795785
///
796786
/// * [TextInput.attach]
797-
/// * [EditableText], a [TextInputClient] implementation.
798787
abstract class TextInputClient {
799788
/// Abstract const constructor. This constructor enables subclasses to provide
800789
/// const constructors so that they can be used in const expressions.
@@ -816,9 +805,6 @@ abstract class TextInputClient {
816805
AutofillScope? get currentAutofillScope;
817806

818807
/// Requests that this client update its editing state to the given value.
819-
///
820-
/// The new [value] is treated as user input and thus may subject to input
821-
/// formatting.
822808
void updateEditingValue(TextEditingValue value);
823809

824810
/// Requests that this client perform the given action.
@@ -846,10 +832,7 @@ abstract class TextInputClient {
846832
///
847833
/// See also:
848834
///
849-
/// * [TextInput.attach], a method used to establish a [TextInputConnection]
850-
/// between the system's text input and a [TextInputClient].
851-
/// * [EditableText], a [TextInputClient] that connects to and interacts with
852-
/// the system's text input using a [TextInputConnection].
835+
/// * [TextInput.attach]
853836
class TextInputConnection {
854837
TextInputConnection._(this._client)
855838
: assert(_client != null),
@@ -906,8 +889,7 @@ class TextInputConnection {
906889
TextInput._instance._updateConfig(configuration);
907890
}
908891

909-
/// Requests that the text input control change its internal state to match
910-
/// the given state.
892+
/// Requests that the text input control change its internal state to match the given state.
911893
void setEditingState(TextEditingValue value) {
912894
assert(attached);
913895
TextInput._instance._setEditingState(value);
@@ -1060,57 +1042,9 @@ RawFloatingCursorPoint _toTextPoint(FloatingCursorDragState state, Map<String, d
10601042

10611043
/// An low-level interface to the system's text input control.
10621044
///
1063-
/// To start interacting with the system's text input control, call [attach] to
1064-
/// establish a [TextInputConnection] between the system's text input control
1065-
/// and a [TextInputClient]. The majority of commands available for
1066-
/// interacting with the text input control reside in the returned
1067-
/// [TextInputConnection]. The communication between the system text input and
1068-
/// the [TextInputClient] is asynchronous.
1069-
///
1070-
/// The platform text input plugin (which represents the system's text input)
1071-
/// and the [TextInputClient] usually maintain their own text editing states
1072-
/// ([TextEditingValue]) separately. They must be kept in sync as long as the
1073-
/// [TextInputClient] is connected. The following methods can be used to send
1074-
/// [TextEditingValue] to update the other party, when either party's text
1075-
/// editing states change:
1076-
///
1077-
/// * The [TextInput.attach] method allows a [TextInputClient] to establish a
1078-
/// connection to the text input. An optional field in its `configuration`
1079-
/// parameter can be used to specify an initial value for the platform text
1080-
/// input plugin's [TextEditingValue].
1081-
///
1082-
/// * The [TextInputClient] sends its [TextEditingValue] to the platform text
1083-
/// input plugin using [TextInputConnection.setEditingState].
1084-
///
1085-
/// * The platform text input plugin sends its [TextEditingValue] to the
1086-
/// connected [TextInputClient] via a "TextInput.setEditingState" message.
1087-
///
1088-
/// * When autofill happens on a disconnected [TextInputClient], the platform
1089-
/// text input plugin sends the [TextEditingValue] to the connected
1090-
/// [TextInputClient]'s [AutofillScope], and the [AutofillScope] will further
1091-
/// relay the value to the correct [TextInputClient].
1092-
///
1093-
/// When synchronizing the [TextEditingValue]s, the communication may get stuck
1094-
/// in an infinite when both parties are trying to send their own update. To
1095-
/// mitigate the problem, only [TextInputClient]s are allowed to alter the
1096-
/// received [TextEditingValue]s while platform text input plugins are to accept
1097-
/// the received [TextEditingValue]s unmodified. More specifically:
1098-
///
1099-
/// * When a [TextInputClient] receives a new [TextEditingValue] from the
1100-
/// platform text input plugin, it's allowed to modify the value (for example,
1101-
/// apply [TextInputFormatter]s). If it decides to do so, it must send the
1102-
/// updated [TextEditingValue] back to the platform text input plugin to keep
1103-
/// the [TextEditingValue]s in sync.
1104-
///
1105-
/// * When the platform text input plugin receives a new value from the
1106-
/// connected [TextInputClient], it must accept the new value as-is, to avoid
1107-
/// sending back an updated value.
1108-
///
11091045
/// See also:
11101046
///
11111047
/// * [TextField], a widget in which the user may enter text.
1112-
/// * [EditableText], a [TextInputClient] that connects to [TextInput] when it
1113-
/// wants to take user input from the keyboard.
11141048
class TextInput {
11151049
TextInput._() {
11161050
_channel = SystemChannels.textInput;

0 commit comments

Comments
 (0)