copyWith method
Copy this temporal extent with optional interval
and/or trs
parameters changed.
Implementation
TemporalExtent copyWith({Interval? interval, TemporalRefSys? trs}) {
if (interval != null) {
return TemporalExtent.single(interval, trs: trs ?? _trs);
} else {
if (trs != null) {
return _intervals != null
? TemporalExtent.multi(_intervals!, trs: trs)
: TemporalExtent.single(_first, trs: trs);
} else {
// ignore: avoid_returning_this
return this;
}
}
}