Skip to content

Commit 83ad28b

Browse files
author
sourabhguptazeil
authored
Added a property to control the detect word boundary behaviour (singerdmx#1103)
1 parent c68c2bd commit 83ad28b

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

lib/src/widgets/delegate.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,8 @@ class EditorTextSelectionGestureDetectorBuilder {
341341
///
342342
/// The [child] or its subtree should contain [EditableText].
343343
Widget build(
344-
{required HitTestBehavior behavior, required Widget child, Key? key}) {
344+
{required HitTestBehavior behavior, required Widget child, Key? key,
345+
bool detectWordBoundary = true}) {
345346
return EditorTextSelectionGestureDetector(
346347
key: key,
347348
onTapDown: onTapDown,

lib/src/widgets/editor.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,7 @@ class QuillEditorState extends State<QuillEditor>
522522
child: selectionEnabled
523523
? _selectionGestureDetectorBuilder.build(
524524
behavior: HitTestBehavior.translucent,
525+
detectWordBoundary: widget.detectWordBoundary,
525526
child: child,
526527
)
527528
: child,

0 commit comments

Comments
 (0)