RecurrenceProperties class

Recurrence properties allows to create recurrence rule for an Appointment.

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

Widget build(BuildContext context) {
  return Container(
     child: SfCalendar(
       view: CalendarView.day,
       dataSource: _getCalendarDataSource(),
     ),
   );
 }

class DataSource extends CalendarDataSource {
 DataSource(List<Appointment> source) {
   appointments = source;
 }
}

DataSource _getCalendarDataSource() {
   List<Appointment> appointments = <Appointment>[];
   RecurrenceProperties recurrence = new RecurrenceProperties();
   recurrence.recurrenceType = RecurrenceType.daily;
   recurrence.interval = 2;
   recurrence.recurrenceRange = RecurrenceRange.count;
   recurrence.recurrenceCount = 10;
   appointments.add(
       Appointment(
         startTime: DateTime.now(),
         endTime: DateTime.now().add(
             Duration(hours: 2)),
         isAllDay: true,
         subject: 'Meeting',
         color: Colors.blue,
         startTimeZone: '',
         endTimeZone: '',
         recurrenceRule: RecurrenceHelper.rRuleGenerator(recurrence,
             DateTime.now(), DateTime.now().add(Duration(hours: 2)))
       ));

  return DataSource(appointments);
}

Constructors

RecurrenceProperties({RecurrenceType recurrenceType, int recurrenceCount, DateTime startDate, DateTime endDate, int interval, RecurrenceRange recurrenceRange, List<WeekDays> weekDays, int week, int dayOfMonth, int dayOfWeek, int month})
Creates an recurrence properties . [...]

Properties

dayOfMonth int
Defines the day in a month for an Appointment to recur. [...]
read / write
dayOfWeek int
Defines the day in a week for an Appointment to recur. [...]
read / write
endDate DateTime
Defines the end date for the Appointment to end it's recurrence. [...]
read / write
hashCode int
The hash code for this object. [...]
read-only, inherited
interval int
Defines the recurrence interval between the Appointment. [...]
read / write
month int
Defines the month of the appointment when recurrence type as year. [...]
read / write
recurrenceCount int
Defines the recurrence count of an Appointment. [...]
read / write
recurrenceRange RecurrenceRange
Defines the range for an Appointment ro recur. [...]
read / write
recurrenceType RecurrenceType
Defines the recurrence type of an Appointment. [...]
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
startDate DateTime
Defines the start date for the Appointment to recur. [...]
read / write
week int
Defines the week for an Appointment to recur. [...]
read / write
weekDays List<WeekDays>
Defines the weekdays for an Appointment to recur. [...]
read / write

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited