Skip to content

Commit

Permalink
Support Flutter 3.13 (#154)
Browse files Browse the repository at this point in the history
* Avoid compilation errors with Flutter 3.13
* CI uses Flutter 3.13
  • Loading branch information
amantoux authored Aug 18, 2023
1 parent 2a42fe3 commit 111a16a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/fleather.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
flutter-version: "3.10.0"
flutter-version: "3.13.0"
cache: true
# Manually Update this `key`
cache-key: "20230512"
Expand Down
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 111a16a

Please sign in to comment.