operator - method

Offset operator -(
  1. Offset other
)

Implements the operator - (subtraction).

  • this: The left hand side of the operator.
  • other: The right hand side of the operator.

Returns: A new Offset representing the difference of the given values.

  • RangeError: The result of the operation is outside the range of Offset.

Implementation

Offset operator -(Offset other) =>
    Offset(inSeconds - other.inSeconds);