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

Loading…
Cancel
Save