indexOf method Null safety

int indexOf(
  1. RenderBox child
)

Gets the index of a child by looking at its parentData.

This relies on the childManager maintaining ListWheelParentData.index.

Implementation

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