defaultApplyPaintTransform method

  1. @protected
void defaultApplyPaintTransform(
  1. RenderBox child,
  2. Matrix4 transform
)

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

Render children whose TextParentData.offset is null zeros out the transform to indicate they're invisible thus should not be painted.

Implementation

@protected
void defaultApplyPaintTransform(RenderBox child, Matrix4 transform) {
  final TextParentData childParentData = child.parentData! as TextParentData;
  final Offset? offset = childParentData.offset;
  if (offset == null) {
    transform.setZero();
  } else {
    transform.translate(offset.dx, offset.dy);
  }
}