timeIntervalWidth property Null safety

double timeIntervalWidth
final

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: 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;