☝️ Update deprecated code

pull/136/head
rootasjey 4 years ago
parent 96b5be1518
commit 0a85bbc1ca
  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() { void hideToolbar([bool hideHandles = true]) {
if (getSelectionOverlay()?.toolbar != null) { if (getSelectionOverlay()?.toolbar != null) {
getSelectionOverlay()?.hideToolbar(); getSelectionOverlay()?.hideToolbar();
} }
@ -1131,6 +1131,10 @@ class RawEditorState extends EditorState
closeConnectionIfNeeded(); closeConnectionIfNeeded();
} }
} }
@override
void userUpdateTextEditingValue(
TextEditingValue value, SelectionChangedCause cause) {}
} }
class _Editor extends MultiChildRenderObjectWidget { class _Editor extends MultiChildRenderObjectWidget {

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

Loading…
Cancel
Save