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.
See also:
- CalendarDataSource, to set and handle the appointment collection to the calendar.
- SfCalendar.appointmentBuilder, to set custom widget for the appointment view in the calendar
- SfCalendar.loadMoreWidgetBuilder, the widget which will be displayed when the appointments loading on the view in calendar.
- SfCalendar.appointmentTextStyle, to customize the appointment text, when the builder not added.
- SfCalendar.appointmentTimeTextFormat, to customize the time text format in the appointment view of calendar.
- Knowledge base: How to customize appointment using builder
- Knowledge base: How to load appointments on demand
- Knowledge base: How to style appointments
- Knowledge base: How to format appointment time
- Knowledge base: How to create time table
- Knowledge base: How to add a custom appointments of business objects
- Knowledge base: How to delete 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);
}
- Mixed-in types
Constructors
-
Appointment({String? startTimeZone, String? endTimeZone, String? recurrenceRule, bool isAllDay = false, String? notes, String? location, List<
Object> ? resourceIds, Object? recurrenceId, Object? id, required DateTime startTime, required DateTime endTime, String subject = '', Color color = Colors.lightBlue, List<DateTime> ? recurrenceExceptionDates}) - Creates an appointment data for SfCalendar.
Properties
- appointmentType → AppointmentType
-
Specifies the appointment type, which is used to distinguish appointments
based on their functionality.
no setter
- color ↔ Color
-
The color that fills the background of the Appointment view in
SfCalendar.
getter/setter pair
- endTime ↔ DateTime
-
The end time for an Appointment in SfCalendar.
getter/setter pair
- endTimeZone ↔ String?
-
The end time zone for an Appointment in SfCalendar.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setteroverride
- id ↔ Object?
-
Defines the id for an Appointment in SfCalendar.
getter/setter pair
- isAllDay ↔ bool
-
Displays the Appointment on the all day panel area of time slot views in
SfCalendar.
getter/setter pair
- location ↔ String?
-
Defines the location for an Appointment in SfCalendar.
getter/setter pair
- notes ↔ String?
-
Defines the notes for an Appointment in SfCalendar.
getter/setter pair
-
recurrenceExceptionDates
↔ List<
DateTime> ? -
Delete the occurrence for an recurrence appointment.
getter/setter pair
- recurrenceId ↔ Object?
-
Defines the recurrence id for an Appointment in SfCalendar,
The recurrence id is used to create an exception appointment
in a recurrence series.
getter/setter pair
- recurrenceRule ↔ String?
-
Recurs the Appointment on SfCalendar.
getter/setter pair
-
resourceIds
↔ List<
Object> ? -
The ids of the CalendarResource that shares this Appointment.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- startTime ↔ DateTime
-
The start time for an Appointment in SfCalendar.
getter/setter pair
- startTimeZone ↔ String?
-
The start time zone for an Appointment in SfCalendar.
getter/setter pair
- subject ↔ String
-
The subject for the Appointment in SfCalendar.
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 ==(
Object other) → bool -
The equality operator.
override