offsetFromUtc property
Duration?
get
offsetFromUtc
The offset to add to UTC to get local time.
May be null, indicating that the current time zone is unknown. In this
case, Clock.now()
will print an error and return system time.
Implementation
Duration? get offsetFromUtc => _offsetFromUtc;
set
offsetFromUtc
(Duration? newOffset)
Implementation
set offsetFromUtc(Duration? newOffset) {
if (newOffset != null && newOffset.inMicroseconds == null) {
throw ArgumentError.value(
newOffset, 'newOffset' 'holds a null or undefined value');
}
if (newOffset != null && newOffset.inMicroseconds.isNaN) {
throw ArgumentError.value(newOffset, 'newOffset' 'is NaN!');
}
if (!_initialized.isCompleted && newOffset != null) {
_initialized.complete();
}
_offsetFromUtc = newOffset;
}