File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ class QuillController extends ChangeNotifier {
23
23
this .onReplaceText,
24
24
this .onDelete,
25
25
this .onSelectionCompleted,
26
+ this .onSelectionChanged,
26
27
}) : _selection = selection,
27
28
_keepStyleOnNewLine = keepStyleOnNewLine;
28
29
@@ -52,6 +53,7 @@ class QuillController extends ChangeNotifier {
52
53
DeleteCallback ? onDelete;
53
54
54
55
void Function ()? onSelectionCompleted;
56
+ void Function (TextSelection textSelection)? onSelectionChanged;
55
57
56
58
/// Store any styles attribute that got toggled by the tap of a button
57
59
/// and that has not been applied yet.
@@ -328,6 +330,7 @@ class QuillController extends ChangeNotifier {
328
330
baseOffset: math.min (selection.baseOffset, end),
329
331
extentOffset: math.min (selection.extentOffset, end));
330
332
toggledStyle = Style ();
333
+ onSelectionChanged? .call (textSelection);
331
334
}
332
335
333
336
/// Given offset, find its leaf node in document
You can’t perform that action at this time.
0 commit comments