Skip to content

Commit a66bd34

Browse files
committed
added dragOffsetNotifier explanation
1 parent 36fe118 commit a66bd34

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

lib/src/editor/raw_editor/raw_editor.dart

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,25 @@ class QuillRawEditor extends StatefulWidget {
2525

2626
final QuillController controller;
2727
final QuillRawEditorConfig config;
28+
29+
/// dragOffsetNotifier - Only used on iOS and Android
30+
///
31+
/// [QuillRawEditor] contains a gesture detector [EditorTextSelectionGestureDetector]
32+
/// within it's widget tree that includes a [RawMagnifier]. The RawMagnifier needs
33+
/// the current position of selection drag events in order to display the magnifier
34+
/// in the correct location. Setting the position to null will hide the magnifier.
35+
///
36+
/// Initial selection events are posted by [EditorTextSelectionGestureDetector]. Once
37+
/// a selection has been created, dragging the selection handles happens in
38+
/// [EditorTextSelectionOverlay].
39+
///
40+
/// Both [EditorTextSelectionGestureDetector] and [EditorTextSelectionOverlay] will update
41+
/// the value of the dragOffsetNotifier.
42+
///
43+
/// The [EditorTextSelectionGestureDetector] will use the value to display the magnifier in
44+
/// the correct location (or hide the magnifier if null). [EditorTextSelectionOverlay] will
45+
/// use the value of the dragOffsetNotifier to hide the context menu when the magnifier is
46+
/// displayed and show the context menu when dragging is complete.
2847
final ValueNotifier<Offset?>? dragOffsetNotifier;
2948

3049
@override

0 commit comments

Comments
 (0)