☝️ Update deprecated code (#136)

pull/141/head
Jeremie Corpinot 4 years ago committed by GitHub
parent 2cbc99287b
commit d62f15d889
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      lib/widgets/raw_editor.dart
  2. 8
      lib/widgets/text_selection.dart

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

@ -155,8 +155,12 @@ class EditorTextSelectionOverlay {
default:
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);
}

Loading…
Cancel
Save