Revert "☝️ Update deprecated code (#136)"

This reverts commit d62f15d889.
pull/141/head
Xin Yao 4 years ago
parent d62f15d889
commit 41056bcc4c
  1. 6
      lib/widgets/raw_editor.dart
  2. 8
      lib/widgets/text_selection.dart

@ -1029,7 +1029,7 @@ class RawEditorState extends EditorState
} }
@override @override
void hideToolbar([bool hideHandles = true]) { void hideToolbar() {
if (getSelectionOverlay()?.toolbar != null) { if (getSelectionOverlay()?.toolbar != null) {
getSelectionOverlay()?.hideToolbar(); getSelectionOverlay()?.hideToolbar();
} }
@ -1131,10 +1131,6 @@ class RawEditorState extends EditorState
closeConnectionIfNeeded(); closeConnectionIfNeeded();
} }
} }
@override
void userUpdateTextEditingValue(
TextEditingValue value, SelectionChangedCause cause) {}
} }
class _Editor extends MultiChildRenderObjectWidget { class _Editor extends MultiChildRenderObjectWidget {

@ -155,12 +155,8 @@ class EditorTextSelectionOverlay {
default: default:
throw 'Invalid position'; throw 'Invalid position';
} }
selectionDelegate.textEditingValue =
selectionDelegate.userUpdateTextEditingValue( value.copyWith(selection: newSelection, composing: TextRange.empty);
value.copyWith(selection: newSelection, composing: TextRange.empty),
SelectionChangedCause.drag,
);
selectionDelegate.bringIntoView(textPosition); selectionDelegate.bringIntoView(textPosition);
} }

Loading…
Cancel
Save