notes property

String? notes
getter/setter pair

Defines the notes for an Appointment in SfCalendar.

Allow to store additional information about the Appointment and can be obtained through the Appointment object.

Defaults to null.

See also:

  • CalendarDataSource.getNotes, which maps the custom business objects corresponding property to this property.
  • location, which used to store the location data of the appointment in the calendar.
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.noEndDate;
   recurrence.recurrenceCount = 10;
   appointments.add(
       Appointment(
           startTime: DateTime.now(),
           endTime: DateTime.now().add(
               Duration(hours: 2)),
           isAllDay: true,
           subject: 'Meeting',
           color: Colors.blue,
           startTimeZone: '',
           notes: '',
           location: '',
           endTimeZone: '',
           recurrenceRule: SfCalendar.generateRRule(
               recurrence, DateTime.now(), DateTime.now().add(
               Duration(hours: 2))),
           recurrenceExceptionDates: [
             DateTime.now().add(Duration(days: 2))
           ]
       ));

   return DataSource(appointments);
 }

Implementation

String? notes;