Support flutter dev/master channel

pull/188/head
Xin Yao 4 years ago
parent ca9a13b150
commit 387669e3ff
  1. 6
      lib/widgets/raw_editor.dart
  2. 11
      lib/widgets/text_selection.dart

@ -1033,7 +1033,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();
} }
@ -1135,6 +1135,10 @@ class RawEditorState extends EditorState
closeConnectionIfNeeded(); closeConnectionIfNeeded();
} }
} }
@override
void userUpdateTextEditingValue(
TextEditingValue value, SelectionChangedCause cause) {}
} }
class _Editor extends MultiChildRenderObjectWidget { class _Editor extends MultiChildRenderObjectWidget {

@ -156,10 +156,13 @@ 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),
..bringIntoView(textPosition); SelectionChangedCause.drag,
);
selectionDelegate.bringIntoView(textPosition);
} }
Widget _buildToolbar(BuildContext context) { Widget _buildToolbar(BuildContext context) {

Loading…
Cancel
Save