Skip to content

Commit

Permalink
Avoid compilation errors with Flutter 3.13
Browse files Browse the repository at this point in the history
  • Loading branch information
amantoux committed Aug 18, 2023
1 parent 2a42fe3 commit 0337c20
Showing 1 changed file with 18 additions and 13 deletions.
31 changes: 18 additions & 13 deletions packages/fleather/lib/src/widgets/editor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1624,19 +1624,24 @@ class RawEditorState extends EditorState
@override
List<ContextMenuButtonItem> get contextMenuButtonItems {
return EditableText.getEditableButtonItems(
clipboardStatus: clipboardStatus?.value,
onCopy: copyEnabled
? () => copySelection(SelectionChangedCause.toolbar)
: null,
onCut:
cutEnabled ? () => cutSelection(SelectionChangedCause.toolbar) : null,
onPaste:
pasteEnabled ? () => pasteText(SelectionChangedCause.toolbar) : null,
onSelectAll: selectAllEnabled
? () => selectAll(SelectionChangedCause.toolbar)
: null,
);
}
clipboardStatus: clipboardStatus?.value,
onCopy: copyEnabled
? () => copySelection(SelectionChangedCause.toolbar)
: null,
onCut: cutEnabled
? () => cutSelection(SelectionChangedCause.toolbar)
: null,
onPaste: pasteEnabled
? () => pasteText(SelectionChangedCause.toolbar)
: null,
onSelectAll: selectAllEnabled
? () => selectAll(SelectionChangedCause.toolbar)
: null,
onLiveTextInput: null);
}

@override
bool liveTextInputEnabled = false;
}

class _Editor extends MultiChildRenderObjectWidget {
Expand Down

0 comments on commit 0337c20

Please sign in to comment.