indexOf method Null safety

int indexOf(
  1. RenderBox child
)

Returns the index of the given child, as given by the SliverMultiBoxAdaptorParentData.index field of the child's parentData.

Implementation

int indexOf(RenderBox child) {
  assert(child != null);
  final SliverMultiBoxAdaptorParentData childParentData = child.parentData! as SliverMultiBoxAdaptorParentData;
  assert(childParentData.index != null);
  return childParentData.index!;
}