From 41056bcc4cd938a87b4280a4034ae15a34425d8f Mon Sep 17 00:00:00 2001 From: Xin Yao Date: Sat, 3 Apr 2021 12:09:30 -0700 Subject: [PATCH] =?UTF-8?q?Revert=20"=E2=98=9D=EF=B8=8F=20Update=20depreca?= =?UTF-8?q?ted=20code=20(#136)"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit d62f15d88968a732b27eb0bb412d9d8c0a47eab0. --- lib/widgets/raw_editor.dart | 6 +----- lib/widgets/text_selection.dart | 8 ++------ 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/lib/widgets/raw_editor.dart b/lib/widgets/raw_editor.dart index eac1cbcf..6a24f39c 100644 --- a/lib/widgets/raw_editor.dart +++ b/lib/widgets/raw_editor.dart @@ -1029,7 +1029,7 @@ class RawEditorState extends EditorState } @override - void hideToolbar([bool hideHandles = true]) { + void hideToolbar() { if (getSelectionOverlay()?.toolbar != null) { getSelectionOverlay()?.hideToolbar(); } @@ -1131,10 +1131,6 @@ class RawEditorState extends EditorState closeConnectionIfNeeded(); } } - - @override - void userUpdateTextEditingValue( - TextEditingValue value, SelectionChangedCause cause) {} } class _Editor extends MultiChildRenderObjectWidget { diff --git a/lib/widgets/text_selection.dart b/lib/widgets/text_selection.dart index f223ef00..8aa29d25 100644 --- a/lib/widgets/text_selection.dart +++ b/lib/widgets/text_selection.dart @@ -155,12 +155,8 @@ class EditorTextSelectionOverlay { default: throw 'Invalid position'; } - - selectionDelegate.userUpdateTextEditingValue( - value.copyWith(selection: newSelection, composing: TextRange.empty), - SelectionChangedCause.drag, - ); - + selectionDelegate.textEditingValue = + value.copyWith(selection: newSelection, composing: TextRange.empty); selectionDelegate.bringIntoView(textPosition); }