DateTimeOrDuration constructor

DateTimeOrDuration(
  1. DateTime? dateTime,
  2. IsoDuration? duration
)

Implementation

DateTimeOrDuration(this.dateTime, this.duration)
    : assert(dateTime != null || duration != null,
          'Either duration or dateTime must be set'),
      assert(!(duration != null && dateTime != null),
          'Either duration or dateTime must be set, but not both');