GpsTime constructor
Constructor.
The autoClamp
parameter indicates the behaviour in case of an value
for secondsSinceEpoch
that's outside the supported range:
autoClamp
= false: throw RangeError if out-of-range value given.autoClamp
= true: clamp the value witin the allowed boundaries.
Implementation
GpsTime(int secondsSinceEpoch, {bool autoClamp = false})
: secondsSinceEpoch = !autoClamp
? _validSecondsSinceEpochOrException(secondsSinceEpoch)
: _clampValidSecondsSinceEpoch(secondsSinceEpoch);