DateAnswerFormat constructor

DateAnswerFormat({
  1. DateTime? defaultDate,
  2. DateTime? minDate,
  3. DateTime? maxDate,
  4. String? question,
  5. String? answerType = type,
})

Implementation

DateAnswerFormat({
  this.defaultDate,
  this.minDate,
  this.maxDate,
  super.question,
  super.answerType = type,
})  : assert(
        minDate == null || maxDate == null || minDate.isBefore(maxDate),
        'mindate must be before maxdate',
      ),
      assert(
        defaultDate == null ||
            minDate == null ||
            defaultDate.isAtSameMomentAs(minDate) ||
            defaultDate.isAfter(minDate),
        'defaultDate must be after minDate',
      ),
      assert(
        defaultDate == null ||
            maxDate == null ||
            defaultDate.isAtSameMomentAs(maxDate) ||
            defaultDate.isBefore(maxDate),
        'defaultDate must be before maxDate',
      ),
      super();