translate method

VisualEffect<ContainerLayer> translate({
  1. double x = 0,
  2. double y = 0,
  3. Alignment anchor = Alignment.center,
})

Implementation

VisualEffect translate({
  double x = 0,
  double y = 0,
  Alignment anchor = Alignment.center,
}) {
  if (x == 0 && y == 0) {
    return this;
  }

  final transform = Matrix4.translationValues(x, y, 0);
  return _TransformVisualEffect(
    transform: transform,
    anchor: anchor,
    childSize: childSize,
    childEffect: this,
  );
}