findCurrentLastChild method

RenderIndexedSemantics? findCurrentLastChild(
  1. RenderSliverMultiBoxAdaptor obj
)
inherited

Find out the current last child in sliver

Implementation

RenderIndexedSemantics? findCurrentLastChild(
    RenderSliverMultiBoxAdaptor obj) {
  RenderIndexedSemantics? child;
  final lastChild = obj.lastChild;
  if (lastChild == null) return null;
  if (lastChild is RenderIndexedSemantics) {
    child = lastChild;
  } else {
    final previousChild = obj.childBefore(lastChild);
    if (previousChild is RenderIndexedSemantics) {
      child = previousChild;
    }
  }
  return child;
}