translate method
override
translate the shape with x in horizontally and y vertically
Implementation
@override
Rectangle translate({double x = 0, double y = 0}) {
return Rectangle(
x: this.x + x,
y: this.y + y,
width: width,
height: height,
);
}