addOffset method
Creates a new Alignment by adding the specified x and/or y values to this alignment
Example usage:
Alignment.center.addOffset(x: -0.3) // Creates Alignment(0.0 - 0.3, 0.0) = Alignment(-0.3, 0.0)
Alignment.topLeft.addOffset(x: 0.5, y: 0.2) // Creates Alignment(-1.0 + 0.5, -1.0 + 0.2) = Alignment(-0.5, -0.8)
Implementation
Alignment addOffset({double x = 0.0, double y = 0.0}) {
return Alignment(
this.x + x,
this.y + y,
);
}