Appointment class

Appointment data for calendar.

An object that contains properties to hold the detailed information about the data, which will be rendered in SfCalendar.

Note: The startTime and endTime properties must not be null to render an appointment.

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>[];
   appointments.add(
       Appointment(
         startTime: DateTime.now(),
         endTime: DateTime.now().add(
             Duration(hours: 2)),
         isAllDay: true,
         subject: 'Meeting',
         color: Colors.blue,
         startTimeZone: '',
         endTimeZone: ''
       ));

  return DataSource(appointments);
}

Constructors

Appointment({String startTimeZone, String endTimeZone, String recurrenceRule, bool isAllDay: false, String notes, String location, List<Object> resourceIds, DateTime startTime, DateTime endTime, String subject, Color color, List<DateTime> recurrenceExceptionDates})
Creates an appointment data for SfCalendar. [...]

Properties

color Color
The color that fills the background of the Appointment view in SfCalendar. [...]
read / write
endTime DateTime
The end time for an Appointment in SfCalendar. [...]
read / write
endTimeZone String
The end time zone for an Appointment in SfCalendar. [...]
read / write
hashCode int
The hash code for this object. [...]
read-only, override
isAllDay bool
Displays the Appointment on the all day panel area of time slot views in SfCalendar. [...]
read / write
location String
Defines the location for an Appointment in SfCalendar. [...]
read / write
notes String
Defines the notes for an Appointment in SfCalendar. [...]
read / write
recurrenceExceptionDates List<DateTime>
Delete the occurrence for an recurrence appointment. [...]
read / write
recurrenceRule String
Recurs the Appointment on SfCalendar. [...]
read / write
resourceIds List<Object>
The ids of the CalendarResource that shares this Appointment. [...]
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
startTime DateTime
The start time for an Appointment in SfCalendar. [...]
read / write
startTimeZone String
The start time zone for an Appointment in SfCalendar. [...]
read / write
subject String
The subject for the Appointment in SfCalendar. [...]
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 ==(dynamic other) bool
The equality operator. [...]
override