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.

See more:

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 =
      RecurrenceProperties(startDate: DateTime.now());
   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: SfCalendar.generateRRule(recurrence,
             DateTime.now(), DateTime.now().add(Duration(hours: 2)))
       ));

  return DataSource(appointments);
}
Mixed-in types

Constructors

RecurrenceProperties({RecurrenceType recurrenceType = RecurrenceType.daily, int recurrenceCount = 0, required DateTime startDate, DateTime? endDate, int interval = 1, RecurrenceRange recurrenceRange = RecurrenceRange.noEndDate, List<WeekDays>? weekDays, int week = 0, int dayOfMonth = 1, int dayOfWeek = 1, int month = 1})
Creates an recurrence properties .

Properties

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

Methods

debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringShort() String
A brief description of this object, usually just the runtimeType and the hashCode.
inherited

Operators

operator ==(dynamic other) bool
The equality operator.
override