Appointment constructor

Appointment({
  1. String? startTimeZone,
  2. String? endTimeZone,
  3. String? recurrenceRule,
  4. bool isAllDay = false,
  5. String? notes,
  6. String? location,
  7. List<Object>? resourceIds,
  8. Object? recurrenceId,
  9. Object? id,
  10. required DateTime startTime,
  11. required DateTime endTime,
  12. String subject = '',
  13. Color color = Colors.lightBlue,
  14. List<DateTime>? recurrenceExceptionDates,
})

Creates an appointment data for SfCalendar.

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

Implementation

Appointment({
  this.startTimeZone,
  this.endTimeZone,
  this.recurrenceRule,
  this.isAllDay = false,
  String? notes,
  this.location,
  this.resourceIds,
  this.recurrenceId,
  this.id,
  required this.startTime,
  required this.endTime,
  this.subject = '',
  this.color = Colors.lightBlue,
  this.recurrenceExceptionDates,
})  : notes = notes != null && notes.contains('isOccurrenceAppointment')
          ? notes.replaceAll('isOccurrenceAppointment', '')
          : notes,
      _notes = notes {
  recurrenceRule = recurrenceId != null ? null : recurrenceRule;
  _appointmentType = _getAppointmentType();
  id = id ?? hashCode;
}