operator + method Null safety

Alignment operator +(
  1. Alignment other
)

Returns the sum of two Alignments.

Implementation

Alignment operator +(Alignment other) {
  return Alignment(x + other.x, y + other.y);
}