translate method

  1. @override
CubicLine 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
CubicLine translate(double translateX, double translateY) => CubicLine(
      start: start.translate(translateX, translateY),
      cpStart: cpStart.translate(translateX, translateY),
      cpEnd: cpEnd.translate(translateX, translateY),
      end: end.translate(translateX, translateY),
      upStartVector: _upStartVector,
      upEndVector: _upEndVector,
      startSize: startSize,
      endSize: endSize,
    );