minus method

  1. @Possible({RangeError})
  2. @useResult
Offset minus({
  1. int hours = 0,
  2. int minutes = 0,
  3. int seconds = 0,
})

Returns a copy of this with the sum of the units of time subtracted.

Contract

Throws a RangeError if the result is outside the valid range.

Example

Offset(-16).minus(hours: 2); // Offset(-18)

Offset(-18).minus(hours: 2); // throws RangeError

Implementation

@Possible({RangeError})
@useResult
Offset minus({int hours = 0, int minutes = 0, int seconds = 0}) => Offset.fromMicroseconds(_microseconds - sumMicroseconds(hours, minutes, seconds));