timeIntervalWidth property
The width for each time slots in the timeline views of SfCalendar.
Note: By setting the value of this property to -1, the calendar time slot width can be adjusted based on the screen width which will be auto-fit to the screen width.
See also:
- timeInterval, which is the duration of every single timeslot in the timeslot views of calendar.
- timeIntervalHeight, which is the height for every single timeslot in the day,week and work week views of calendar.
- minimumAppointmentDuration, which is the minimum duration for the appointment, if the appointment duration is too small to display on view.
- 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
- Knowledge base: How to customize the timeline appointment height
- To know more about time slot views in calendar refer here
Widget build(BuildContext context) {
return Container(
child: SfCalendar(
view: CalendarView.timelineWeek,
timeSlotViewSettings: TimeSlotViewSettings(
startHour: 10,
endHour: 20,
timeInterval: Duration(minutes: 120),
timeIntervalWidth: 80,
timeFormat: 'h:mm',
dateFormat: 'd',
dayFormat: 'EEE',
timeRulerSize: 70),
),
);
}
Implementation
final double timeIntervalWidth;