minimumAppointmentDuration property
Sets an arbitrary height for an appointment when it has minimum duration in time slot views of SfCalendar.
Defaults to null.
Note: The value set to this property will be applicable, only when an Appointment duration value lesser than this property.
See also:
- timeInterval, which is the duration of every single timeslot in the timeslot views of calendar.
- timeIntervalWidth, which is the width for every single timeslot in the timeline views of calendar.
- timeIntervalHeight, which is the height for every single timeslot in the timeline views of calendar.
- timelineAppointmentHeight, which is the height for appointment view in the timeline views of calendar.
- Knowledge base: How to change the time interval width and height
- Knowledge base: How to set the arbitrary height to an appointment
- Knowledge base: How to auto fit the calendar to screen height
Widget build(BuildContext context) {
return Container(
child: SfCalendar(
view: CalendarView.workWeek,
timeSlotViewSettings: TimeSlotViewSettings(
startHour: 10,
endHour: 20,
nonWorkingDays: <int>[
DateTime.saturday,
DateTime.sunday,
DateTime.friday
],
timeInterval: Duration(minutes: 60),
minimumAppointmentDuration: Duration(minutes: 30),
timeIntervalHeight: 80,
timeFormat: 'h:mm',
dateFormat: 'd',
dayFormat: 'EEE',
timeRulerSize: 70),
),
);
}
Implementation
final Duration? minimumAppointmentDuration;