recurrenceId property

Object? recurrenceId
getter/setter pair

Defines the recurrence id for an Appointment in SfCalendar, The recurrence id is used to create an exception appointment in a recurrence series.

Defaults to null. The recurrenceId of the exception appointment and the id of the pattern appointment should be same. The recurrenceId should be specified only for exception appointments. It is not required for occurrence, and normal appointments.

Note: The exception appointment should be a normal appointment and should not be created as recurring appointment, since its occurrence from recurrence pattern.

Exception recurrence appointment should not have a RRule. If the exception appointment has RRule, it will not be considered.

See also:

AppointmentDataSource _getDataSource() {
 List<Appointment> appointments = <Appointment>[];
 final DateTime exceptionDate = DateTime(2021, 04, 20);

 final Appointment recurrenceAppointment = Appointment(
   startTime: DateTime(2021, 04, 12, 10),
   endTime: DateTime(2021, 04, 12, 12),
   subject: 'Scrum meeting',
   id: '01',
   recurrenceRule: 'FREQ=DAILY;INTERVAL=1;COUNT=10',
   recurrenceExceptionDates: <DateTime>[exceptionDate],
 );
 appointments.add(recurrenceAppointment);

 final Appointment exceptionAppointment = Appointment(
     startTime: exceptionDate.add(Duration(hours: 10)),
     endTime: exceptionDate.add(Duration(hours: 12)),
     subject: 'Meeting',
     id: '02',
     recurrenceId: recurrenceAppointment.id);

 appointments.add(exceptionAppointment);

 return AppointmentDataSource(appointments);
}

Implementation

Object? recurrenceId;