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

@ -156,10 +156,13 @@ class EditorTextSelectionOverlay {
default:
throw 'Invalid position';
}
selectionDelegate
..textEditingValue =
value.copyWith(selection: newSelection, composing: TextRange.empty)
..bringIntoView(textPosition);
selectionDelegate.userUpdateTextEditingValue(
value.copyWith(selection: newSelection, composing: TextRange.empty),
SelectionChangedCause.drag,
);
selectionDelegate.bringIntoView(textPosition);
}
Widget _buildToolbar(BuildContext context) {

Loading…
Cancel
Save