KeyedSubtreeModifier.wrap constructor
Creates a KeyedSubtree for child with a key that's based on the child's existing key or childIndex.
Implementation
factory KeyedSubtreeModifier.wrap(Widget child, int childIndex) {
final Key key = child.key != null ? ValueKey<Key>(child.key!) : ValueKey<int>(childIndex);
return KeyedSubtreeModifier(key: key, child: child);
}