operator - method Null safety

Offset operator -(
  1. Offset other
)

Binary subtraction operator.

Returns an offset whose dx value is the left-hand-side operand's dx minus the right-hand-side operand's dx and whose dy value is the left-hand-side operand's dy minus the right-hand-side operand's dy.

See also translate.

Implementation

Offset operator -(Offset other) => Offset(dx - other.dx, dy - other.dy);