KeyedSubtree.wrap constructor

KeyedSubtree.wrap(
  1. Widget child,
  2. int childIndex
)

Creates a KeyedSubtree for child with a key that's based on the child's existing key or childIndex.

Implementation

KeyedSubtree.wrap(this.child, int childIndex)
    : super(key: ValueKey<Object>(child.key ?? childIndex));