RepaintBoundaryModifier.wrap constructor
Wraps the given child in a RepaintBoundary.
The key for the RepaintBoundary is derived either from the child's key
(if the child has a non-null key) or from the given childIndex
.
Implementation
@override
factory RepaintBoundaryModifier.wrap(Widget child, int childIndex) {
final Key key = child.key != null ? ValueKey<Key>(child.key!) : ValueKey<int>(childIndex);
return RepaintBoundaryModifier(modifierKey: key, child: child);
}