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
1178c8e9
Unverified
Commit
1178c8e9
authored
Feb 23, 2022
by
chunhtai
Committed by
GitHub
Feb 23, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Remove redundant hide handles API from TextSelectionDelegate (#98944)" (#99008)
This reverts commit
94f6fd6e
.
parent
85d4b280
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
5 deletions
+11
-5
text_input.dart
packages/flutter/lib/src/services/text_input.dart
+7
-0
editable_text.dart
packages/flutter/lib/src/widgets/editable_text.dart
+1
-5
editable_test.dart
packages/flutter/test/rendering/editable_test.dart
+3
-0
No files found.
packages/flutter/lib/src/services/text_input.dart
View file @
1178c8e9
...
@@ -990,6 +990,13 @@ mixin TextSelectionDelegate {
...
@@ -990,6 +990,13 @@ mixin TextSelectionDelegate {
/// updating the text editing state.
/// updating the text editing state.
void
userUpdateTextEditingValue
(
TextEditingValue
value
,
SelectionChangedCause
cause
);
void
userUpdateTextEditingValue
(
TextEditingValue
value
,
SelectionChangedCause
cause
);
/// Hides the text selection toolbar.
///
/// By default, hideHandles is true, and the toolbar is hidden along with its
/// handles. If hideHandles is set to false, then the toolbar will be hidden
/// but the handles will remain.
void
hideToolbar
([
bool
hideHandles
=
true
]);
/// Brings the provided [TextPosition] into the visible area of the text
/// Brings the provided [TextPosition] into the visible area of the text
/// input.
/// input.
void
bringIntoView
(
TextPosition
position
);
void
bringIntoView
(
TextPosition
position
);
...
...
packages/flutter/lib/src/widgets/editable_text.dart
View file @
1178c8e9
...
@@ -2908,11 +2908,7 @@ class EditableTextState extends State<EditableText> with AutomaticKeepAliveClien
...
@@ -2908,11 +2908,7 @@ class EditableTextState extends State<EditableText> with AutomaticKeepAliveClien
return
true
;
return
true
;
}
}
/// Hides the text selection toolbar.
@override
///
/// By default, hideHandles is true, and the toolbar is hidden along with its
/// handles. If hideHandles is set to false, then the toolbar will be hidden
/// but the handles will remain.
void
hideToolbar
([
bool
hideHandles
=
true
])
{
void
hideToolbar
([
bool
hideHandles
=
true
])
{
if
(
hideHandles
)
{
if
(
hideHandles
)
{
// Hide the handles and the toolbar.
// Hide the handles and the toolbar.
...
...
packages/flutter/test/rendering/editable_test.dart
View file @
1178c8e9
...
@@ -27,6 +27,9 @@ class _FakeEditableTextState with TextSelectionDelegate {
...
@@ -27,6 +27,9 @@ class _FakeEditableTextState with TextSelectionDelegate {
@override
@override
TextEditingValue
textEditingValue
=
TextEditingValue
.
empty
;
TextEditingValue
textEditingValue
=
TextEditingValue
.
empty
;
@override
void
hideToolbar
([
bool
hideHandles
=
true
])
{
}
@override
@override
void
userUpdateTextEditingValue
(
TextEditingValue
value
,
SelectionChangedCause
cause
)
{
}
void
userUpdateTextEditingValue
(
TextEditingValue
value
,
SelectionChangedCause
cause
)
{
}
...
...
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