applyTransform method

  1. @override
void applyTransform(
  1. Layer? child,
  2. Matrix4 transform
)
override

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

See ContainerLayer.applyTransform for details.

The child argument may be null, as the same transform is applied to all children.

Implementation

@override
void applyTransform(Layer? child, Matrix4 transform) {
  if (offset != Offset.zero) {
    transform.translate(offset.dx, offset.dy);
  }
}