Skip to content

Commit f6223e0

Browse files
committed
Use actions to fix showing handler
1 parent 22ab369 commit f6223e0

File tree

3 files changed

+868
-6
lines changed

3 files changed

+868
-6
lines changed

lib/src/widgets/editor.dart

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1544,13 +1544,50 @@ class RenderEditor extends RenderEditableContainerBox
15441544

15451545
// End TextLayoutMetrics implementation
15461546

1547+
QuillVerticalCaretMovementRun startVerticalCaretMovement(
1548+
TextPosition startPosition) {
1549+
return QuillVerticalCaretMovementRun._(
1550+
this,
1551+
startPosition,
1552+
);
1553+
}
1554+
15471555
@override
15481556
void systemFontsDidChange() {
15491557
super.systemFontsDidChange();
15501558
markNeedsLayout();
15511559
}
15521560
}
15531561

1562+
class QuillVerticalCaretMovementRun
1563+
extends BidirectionalIterator<TextPosition> {
1564+
QuillVerticalCaretMovementRun._(
1565+
this._editor,
1566+
this._currentTextPosition,
1567+
);
1568+
1569+
TextPosition _currentTextPosition;
1570+
1571+
final RenderEditor _editor;
1572+
1573+
@override
1574+
TextPosition get current {
1575+
return _currentTextPosition;
1576+
}
1577+
1578+
@override
1579+
bool moveNext() {
1580+
_currentTextPosition = _editor.getTextPositionBelow(_currentTextPosition);
1581+
return true;
1582+
}
1583+
1584+
@override
1585+
bool movePrevious() {
1586+
_currentTextPosition = _editor.getTextPositionAbove(_currentTextPosition);
1587+
return true;
1588+
}
1589+
}
1590+
15541591
class EditableContainerParentData
15551592
extends ContainerBoxParentData<RenderEditableBox> {}
15561593

0 commit comments

Comments
 (0)