TimeSlotViewSettings constructor

const TimeSlotViewSettings({
  1. double startHour = 0,
  2. double endHour = 24,
  3. List<int> nonWorkingDays = const <int>[DateTime.saturday, DateTime.sunday],
  4. String timeFormat = 'h a',
  5. Duration timeInterval = const Duration(minutes: 60),
  6. double timeIntervalHeight = 40,
  7. double timeIntervalWidth = -2,
  8. double timelineAppointmentHeight = -1,
  9. Duration? minimumAppointmentDuration,
  10. String dateFormat = 'd',
  11. String dayFormat = 'EE',
  12. double timeRulerSize = -1,
  13. TextStyle? timeTextStyle,
  14. Color? allDayPanelColor,
  15. int numberOfDaysInView = -1,
})

Creates a timeslot view settings for calendar.

The properties allows to customize the timeslot views of SfCalendar.

Implementation

const TimeSlotViewSettings({
  this.startHour = 0,
  this.endHour = 24,
  this.nonWorkingDays = const <int>[DateTime.saturday, DateTime.sunday],
  this.timeFormat = 'h a',
  this.timeInterval = const Duration(minutes: 60),
  this.timeIntervalHeight = 40,
  this.timeIntervalWidth = -2,
  this.timelineAppointmentHeight = -1,
  this.minimumAppointmentDuration,
  this.dateFormat = 'd',
  this.dayFormat = 'EE',
  this.timeRulerSize = -1,
  this.timeTextStyle,
  this.allDayPanelColor,
  this.numberOfDaysInView = -1,
}) : assert(startHour >= 0 && startHour <= 24),
     assert(endHour >= 0 && endHour <= 24),
     assert(timeIntervalHeight >= -1),
     assert(timeIntervalWidth >= -2),
     assert(timelineAppointmentHeight >= -1),
     assert(timeRulerSize >= -1),
     assert(numberOfDaysInView >= -1);