Skip to content

Commit

Permalink
Adapt to Flutter API changes
Browse files Browse the repository at this point in the history
  • Loading branch information
amantoux committed Nov 18, 2023
1 parent 74447c4 commit 7e572ed
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
12 changes: 12 additions & 0 deletions packages/fleather/lib/src/widgets/editor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -747,6 +747,15 @@ class RawEditor extends StatefulWidget {
///
abstract class EditorState extends State<RawEditor>
implements TextSelectionDelegate {
@override
bool lookUpEnabled = true;

@override
bool shareEnabled = true;

@override
bool searchWebEnabled = true;

ClipboardStatusNotifier? get clipboardStatus;

ScrollController get scrollController;
Expand Down Expand Up @@ -1637,6 +1646,9 @@ class RawEditorState extends EditorState
onSelectAll: selectAllEnabled
? () => selectAll(SelectionChangedCause.toolbar)
: null,
onLookUp: null,
onSearchWeb: null,
onShare: null,
onLiveTextInput: null);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,8 @@ class _RenderSingleChildViewport extends RenderBox

@override
RevealedOffset getOffsetToReveal(RenderObject target, double alignment,
{Rect? rect}) {
{Rect? rect, Axis? axis}) {
// axis is ignored as we only support SingleDimensionViewport
rect ??= target.paintBounds;
if (target is! RenderBox) {
return RevealedOffset(offset: offset.pixels, rect: rect);
Expand Down

0 comments on commit 7e572ed

Please sign in to comment.