From 8782d51422b8d85e0a815253303517c13862fd85 Mon Sep 17 00:00:00 2001 From: Michal Misiaszek Date: Wed, 10 May 2023 23:16:55 -0700 Subject: [PATCH] Fixed issues from last Flutter update. --- lib/src/widgets/delegate.dart | 3 ++- lib/src/widgets/raw_editor.dart | 2 ++ lib/src/widgets/text_selection.dart | 5 +++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/src/widgets/delegate.dart b/lib/src/widgets/delegate.dart index de92d8eb..988473bd 100644 --- a/lib/src/widgets/delegate.dart +++ b/lib/src/widgets/delegate.dart @@ -312,7 +312,8 @@ class EditorTextSelectionGestureDetectorBuilder { /// which triggers this callback./lib/src/material/text_field.dart @protected void onDragSelectionUpdate( - DragStartDetails startDetails, DragUpdateDetails updateDetails) { + //DragStartDetails startDetails, + DragUpdateDetails updateDetails) { renderEditor!.extendSelection(updateDetails.globalPosition, cause: SelectionChangedCause.drag); } diff --git a/lib/src/widgets/raw_editor.dart b/lib/src/widgets/raw_editor.dart index 89831d96..7d60a051 100644 --- a/lib/src/widgets/raw_editor.dart +++ b/lib/src/widgets/raw_editor.dart @@ -325,6 +325,8 @@ class RawEditorState extends EditorState TextDirection get _textDirection => Directionality.of(context); + void insertContent(KeyboardInsertedContent content) {} + /// Returns the [ContextMenuButtonItem]s representing the buttons in this /// platform's default selection menu for [RawEditor]. /// diff --git a/lib/src/widgets/text_selection.dart b/lib/src/widgets/text_selection.dart index ad1398e0..688505e2 100644 --- a/lib/src/widgets/text_selection.dart +++ b/lib/src/widgets/text_selection.dart @@ -713,7 +713,7 @@ class EditorTextSelectionGestureDetector extends StatefulWidget { /// The frequency of calls is throttled to avoid excessive text layout /// operations in text fields. The throttling is controlled by the constant /// [_kDragSelectionUpdateThrottle]. - final DragSelectionUpdateCallback? onDragSelectionUpdate; + final GestureDragUpdateCallback? onDragSelectionUpdate; /// Called when a mouse that was previously dragging is released. final GestureDragEndCallback? onDragSelectionEnd; @@ -857,7 +857,8 @@ class _EditorTextSelectionGestureDetectorState assert(_lastDragUpdateDetails != null); if (widget.onDragSelectionUpdate != null) { widget.onDragSelectionUpdate!( - _lastDragStartDetails!, _lastDragUpdateDetails!); + //_lastDragStartDetails!, + _lastDragUpdateDetails!); } _dragUpdateThrottleTimer = null; _lastDragUpdateDetails = null;