RecurrenceProperties class Null safety

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. [...]
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, override
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

debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node. [...]
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent 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