Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Amir-P committed Apr 5, 2024
1 parent f5d6bf2 commit f769943
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions packages/fleather/lib/src/rendering/editable_text_line.dart
Original file line number Diff line number Diff line change
Expand Up @@ -470,13 +470,11 @@ class RenderEditableTextLine extends RenderEditableBox {
bool _containsCursor = false;

bool get containsCursor {
if (node.parent != null) {
return _containsCursor = _cursorController.isFloatingCursorActive
? node.containsOffset(
_cursorController.floatingCursorTextPosition.value!.offset)
: selection.isCollapsed && node.containsOffset(selection.baseOffset);
}
return _containsCursor;
if (node.parent == null) return _containsCursor;
return _containsCursor = _cursorController.isFloatingCursorActive
? node.containsOffset(
_cursorController.floatingCursorTextPosition.value!.offset)
: selection.isCollapsed && node.containsOffset(selection.baseOffset);
}

late Rect _caretPrototype;
Expand Down

0 comments on commit f769943

Please sign in to comment.