toDateTimeRange property

DateTimeRange? toDateTimeRange

Constructs a DateTimeRange from an instance of ZdsDateTimeRange only if isValid.

Implementation

DateTimeRange? get toDateTimeRange {
  if (isValid) return DateTimeRange(start: start!, end: end!);
  return null;
}