fix: outcommented clipboard status

pull/1721/head
Carsten Seeger 1 year ago committed by X Code
parent e8eebb2c38
commit ed514c02fb
  1. 17
      lib/src/widgets/raw_editor/raw_editor_state.dart

@ -319,8 +319,8 @@ class QuillRawEditorState extends EditorState
/// Copied from [EditableTextState].
List<ContextMenuButtonItem> get contextMenuButtonItems {
return EditableText.getEditableButtonItems(
// clipboardStatus: _clipboardStatus.value,
clipboardStatus: null,
clipboardStatus:
(_clipboardStatus != null) ? _clipboardStatus!.value : null,
onCopy: copyEnabled
? () => copySelection(SelectionChangedCause.toolbar)
: null,
@ -1121,8 +1121,9 @@ class QuillRawEditorState extends EditorState
@override
void initState() {
super.initState();
// _clipboardStatus.addListener(_onChangedClipboardStatus);
if (clipboardStatus != null) {
_clipboardStatus!.addListener(_onChangedClipboardStatus);
}
controller.addListener(_didChangeTextEditingValueListener);
@ -1276,9 +1277,11 @@ class QuillRawEditorState extends EditorState
controller.removeListener(_didChangeTextEditingValueListener);
widget.configurations.focusNode.removeListener(_handleFocusChanged);
_cursorCont.dispose();
//_clipboardStatus
// ..removeListener(_onChangedClipboardStatus)
// ..dispose();
if (_clipboardStatus != null) {
_clipboardStatus!
..removeListener(_onChangedClipboardStatus)
..dispose();
}
super.dispose();
}

Loading…
Cancel
Save