RepaintBoundary.wrap constructor

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

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

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