hasOffset function
Matches the values the time zone offset of an OffsetDateTime or ZonedDateTime.
Implementation
Matcher hasOffset(Object? hours,
[Object? minutes = isZero, Object? seconds = isZero]) {
return anyOf(
isA<OffsetDateTime>()
.having((d) => d.offset.hours, 'hours', hours)
.having((d) => d.offset.minutes, 'minutes', minutes)
.having((d) => d.offset.seconds, 'seconds', seconds),
isA<ZonedDateTime>()
.having((d) => d.offset.hours, 'hours', hours)
.having((d) => d.offset.minutes, 'minutes', minutes)
.having((d) => d.offset.seconds, 'seconds', seconds),
);
}