subtract method

void subtract(
  1. Duration duration
)

Implementation

void subtract(Duration duration) {
  _durationLeft -= duration;
  if (_durationLeft.isNegative) {
    throw Exception('Duration cannot be negative');
  }
  if (isDone) _onDone();
}