applyPaintTransform method

  1. @override
void applyPaintTransform (
  1. covariant RenderBox child,
  2. Matrix4 transform

Applies the transform that would be applied when painting the given child to the given matrix.

Used by coordinate conversion functions to translate coordinates local to one render object into coordinates local to another render object.


void applyPaintTransform(RenderBox child, Matrix4 transform) {
  if (_keepAliveBucket.containsKey(indexOf(child))) {
    // It is possible that widgets under kept alive children want to paint
    // themselves. For example, the Material widget tries to paint all
    // InkFeatures under its subtree as long as they are not disposed. In
    // such case, we give it a zero transform to prevent them from painting.
  } else {
    applyPaintTransformForBoxChild(child, transform);