TimeSlotViewSettings class

The settings have properties which allow to customize the time slot views of the SfCalendar.

Allows to customize the startHour, endHour, nonWorkingDays, timeInterval, timeIntervalHeight, timeFormat, dateFormat,dayFormat and timeRulerSize in time slot views of calendar.

See also:

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: 120),
           timeIntervalHeight: 80,
           timeFormat: 'h:mm',
           dateFormat: 'd',
           dayFormat: 'EEE',
           timeRulerSize: 70),
     ),
   );
 }
Mixed-in types
Annotations

Constructors

TimeSlotViewSettings({double startHour = 0, double endHour = 24, List<int> nonWorkingDays = const <int>[DateTime.saturday, DateTime.sunday], String timeFormat = 'h a', Duration timeInterval = const Duration(minutes: 60), double timeIntervalHeight = 40, double timeIntervalWidth = -2, double timelineAppointmentHeight = -1, Duration? minimumAppointmentDuration, String dateFormat = 'd', String dayFormat = 'EE', double timeRulerSize = -1, TextStyle? timeTextStyle, Color? allDayPanelColor, int numberOfDaysInView = -1})
Creates a timeslot view settings for calendar.
const

Properties

allDayPanelColor Color?
The color which fills the SfCalendar all day panel background.
final
dateFormat String
Formats the date text in the view header view of SfCalendar time slot views.
final
dayFormat String
Formats the day text in the view header view of SfCalendar time slot views.
final
endHour double
The end hour for the time slot views in SfCalendar.
final
hashCode int
The hash code for this object.
no setteroverride
minimumAppointmentDuration Duration?
Sets an arbitrary height for an appointment when it has minimum duration in time slot views of SfCalendar.
final
nonWorkingDays List<int>
The non working days for the work week view and time slot work week view in SfCalendar.
final
numberOfDaysInView int
The number of days count in week in the SfCalendar.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
startHour double
The start hour for the time slot views in SfCalendar.
final
timeFormat String
Formats for the time text in the time slot views of SfCalendar.
final
timeInterval Duration
The time interval between the time slots in time slot views of SfCalendar.
final
timeIntervalHeight double
The height for each time slot to layout within this in time slot views of SfCalendar.
final
timeIntervalWidth double
The width for each time slots in the timeline views of SfCalendar.
final
timelineAppointmentHeight double
The height for an appointment view to layout within this in timeline views of SfCalendar.
final
timeRulerSize double
The width for the time ruler view to layout with in this in time slot views of SfCalendar.
final
timeTextStyle TextStyle?
The text style for the time text in the time slots views of SfCalendar.
final

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 ==(dynamic other) bool
The equality operator.
override