RecurrenceProperties constructor

RecurrenceProperties({
  1. RecurrenceType recurrenceType = RecurrenceType.daily,
  2. int recurrenceCount = 0,
  3. required DateTime startDate,
  4. DateTime? endDate,
  5. int interval = 1,
  6. RecurrenceRange recurrenceRange = RecurrenceRange.noEndDate,
  7. List<WeekDays>? weekDays,
  8. int week = 0,
  9. int dayOfMonth = 1,
  10. int dayOfWeek = 1,
  11. int month = 1,
})

Creates an recurrence properties .

An object contains properties that hold data for the creation of Appointment.recurrenceRule for Appointment using the SfCalendar.generateRRule method.

Implementation

RecurrenceProperties(
    {this.recurrenceType = RecurrenceType.daily,
    this.recurrenceCount = 0,
    required this.startDate,
    this.endDate,
    this.interval = 1,
    this.recurrenceRange = RecurrenceRange.noEndDate,
    List<WeekDays>? weekDays,
    this.week = 0,
    this.dayOfMonth = 1,
    this.dayOfWeek = 1,
    this.month = 1})
    : weekDays = weekDays ?? <WeekDays>[],
      assert(recurrenceCount >= 0),
      assert(endDate == null ||
          CalendarViewHelper.isSameOrBeforeDateTime(endDate, startDate)),
      assert(endDate == null ||
          CalendarViewHelper.isSameOrAfterDateTime(startDate, endDate)),
      assert(interval >= 1),
      assert(week >= -2 && week <= 5),
      assert(dayOfMonth >= 1 && dayOfMonth <= 31),
      assert(dayOfWeek >= 1 && dayOfWeek <= 7),
      assert(month >= 1 && month <= 12);