Period constructor

Period(
  1. DateTime startDate, {
  2. IsoDuration? duration,
  3. DateTime? endDate,
})

Implementation

Period(this.startDate, {this.duration, this.endDate})
    : assert(duration != null || endDate != null,
          'Either duration or endDate must be set.'),
      assert(!(duration != null && endDate != null),
          'Not both duration and endDate can be set at the same time.');