File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -249,6 +249,12 @@ class _FloatColumnElement extends RenderObjectElement
249249 @override
250250 List <Object > get textAndWidgets => (widget as FloatColumn )._textAndWidgets;
251251
252+ @override
253+ RenderBox ? childAt (int index) {
254+ // dmPrint('_FloatColumnElement childAt');
255+ return _childElements[index]? .renderObject as RenderBox ? ;
256+ }
257+
252258 @override
253259 RenderBox ? addOrUpdateChild (int index, {required RenderBox ? after}) {
254260 // dmPrint('_FloatColumnElement createChild');
Original file line number Diff line number Diff line change @@ -9,6 +9,9 @@ abstract class FloatColumnChildManager {
99 /// The resulting child widgets, built from `textAndWidgets` .
1010 HashMap <int , Widget ?> get childWidgets;
1111
12+ /// Returns the child RenderBox at the given index.
13+ RenderBox ? childAt (int index);
14+
1215 /// Adds or updates the child element at the given index.
1316 RenderBox ? addOrUpdateChild (int index, {required RenderBox ? after});
1417
Original file line number Diff line number Diff line change @@ -472,6 +472,17 @@ class _RenderCursor {
472472 index-- ;
473473 }
474474
475+ /// Jumps to the child at the given index, if it exists.
476+ bool jumpToIndex (int index) {
477+ final newChild = rfc.childManager.childAt (index);
478+ if (newChild == null ) return false ;
479+ maybeChild = newChild;
480+ previousChild =
481+ (previousChild! .parentData! as FloatColumnParentData ).previousSibling;
482+ this .index = index;
483+ return true ;
484+ }
485+
475486 /// Updates the current child's widget and associated element.
476487 void updateCurrentChildWidget (Widget widget) {
477488 rfc.childManager.childWidgets[index] = widget;
You can’t perform that action at this time.
0 commit comments