operator - method Null safety

OffsetPair operator -(
  1. OffsetPair other
)

Subtracts the other.global from global and other.local from local.

Implementation

OffsetPair operator-(OffsetPair other) {
  return OffsetPair(
    local: local - other.local,
    global: global - other.global,
  );
}