translate method

  1. @override
Offset translate(
  1. double translateX,
  2. double translateY
)
override

Returns a new offset with translateX added to the x component and translateY added to the y component.

If the arguments come from another Offset, consider using the + or - operators instead:

Offset a = const Offset(10.0, 10.0);
Offset b = const Offset(10.0, 10.0);
Offset c = a + b; // same as: a.translate(b.dx, b.dy)
Offset d = a - b; // same as: a.translate(-b.dx, -b.dy)

Implementation

@override
Offset translate(double translateX, double translateY) => CubicArc(
      start: Offset(dx + translateX, dy + translateY),
      location: location.translate(translateX, translateY),
      size: size,
    );