findCurrentFirstChild method

RenderIndexedSemantics? findCurrentFirstChild(
  1. RenderSliverMultiBoxAdaptor obj
)
inherited

Find out the current first child in sliver

Implementation

RenderIndexedSemantics? findCurrentFirstChild(
  RenderSliverMultiBoxAdaptor obj,
) {
  RenderIndexedSemantics? child;
  final firstChild = obj.firstChild;
  if (firstChild == null) return null;
  if (firstChild is RenderIndexedSemantics) {
    child = firstChild;
  } else {
    final nextChild = obj.childAfter(firstChild);
    if (nextChild is RenderIndexedSemantics) {
      child = nextChild;
    }
  }
  return child;
}