add method

  1. @useResult
OffsetTime add(
  1. Duration duration
)

Returns a copy of this with the duration added, wrapping around midnight.

OffsetTime(Offset(8), 12).add(Duration(hours: -1)); // 11:00+08:00

OffsetTime(Offset(8), 20).add(Duration(hours: 8)); // 04:00+08:00

Implementation

@useResult OffsetTime add(Duration duration) => OffsetTime._(offset, _native.add(duration));