Skip to content

Commit e83e481

Browse files
committed
Refactors editor return logic
Removes unnecessary variable assignment. Simplifies the conditional return statement within the editor widget for improved readability and efficiency.
1 parent 555ed37 commit e83e481

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/src/editor/editor.dart

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ class QuillEditorState extends State<QuillEditor>
330330
),
331331
);
332332

333-
final editor = selectionEnabled
333+
return selectionEnabled
334334
? _selectionGestureDetectorBuilder.build(
335335
behavior: HitTestBehavior.translucent,
336336
detectWordBoundary: config.detectWordBoundary,
@@ -339,8 +339,6 @@ class QuillEditorState extends State<QuillEditor>
339339
quillMagnifierBuilder: config.quillMagnifierBuilder,
340340
)
341341
: child;
342-
343-
return editor;
344342
}
345343

346344
EmbedBuilder _getEmbedBuilder(Embed node) {

0 commit comments

Comments
 (0)