Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
035eeb53
Unverified
Commit
035eeb53
authored
Mar 09, 2022
by
Justin McCandless
Committed by
GitHub
Mar 09, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updateEditingValueWithDeltas snippet docs fix (#99570)
Just a docs change for a broken tool snippet.
parent
cff36b94
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
text_input.dart
packages/flutter/lib/src/services/text_input.dart
+9
-2
No files found.
packages/flutter/lib/src/services/text_input.dart
View file @
035eeb53
...
@@ -1195,16 +1195,23 @@ abstract class DeltaTextInputClient extends TextInputClient {
...
@@ -1195,16 +1195,23 @@ abstract class DeltaTextInputClient extends TextInputClient {
/// to the client's editing state. A change is any mutation to the raw text
/// to the client's editing state. A change is any mutation to the raw text
/// value, or any updates to the selection and/or composing region.
/// value, or any updates to the selection and/or composing region.
///
///
/// Here is an example of what implementation of this method could look like:
/// {@tool snippet}
/// {@tool snippet}
/// This example shows what an implementation of this method could look like.
///
/// ```dart
/// TextEditingValue? _localValue;
/// @override
/// @override
/// void updateEditingValueWithDeltas(List<TextEditingDelta> textEditingDeltas) {
/// void updateEditingValueWithDeltas(List<TextEditingDelta> textEditingDeltas) {
/// TextEditingValue newValue = _previousValue;
/// if (_localValue == null) {
/// return;
/// }
/// TextEditingValue newValue = _localValue!;
/// for (final TextEditingDelta delta in textEditingDeltas) {
/// for (final TextEditingDelta delta in textEditingDeltas) {
/// newValue = delta.apply(newValue);
/// newValue = delta.apply(newValue);
/// }
/// }
/// _localValue = newValue;
/// _localValue = newValue;
/// }
/// }
/// ```
/// {@end-tool}
/// {@end-tool}
void
updateEditingValueWithDeltas
(
List
<
TextEditingDelta
>
textEditingDeltas
);
void
updateEditingValueWithDeltas
(
List
<
TextEditingDelta
>
textEditingDeltas
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment