Offset constructor
Offset([
- int seconds = 0
Returns an offset for the given seconds value, which may be negative.
seconds
: The int seconds value.
Returns: An offset representing the given number of seconds.
- RangeError: The specified number of seconds is outside the range of
-18, +18
hours.
Implementation
factory Offset([int seconds = 0]) {
Preconditions.checkArgumentRange('seconds', seconds, _minSeconds, _maxSeconds);
return Offset._(seconds);
}