timeTextStyle property
The text style for the time text in the time slots views of SfCalendar.
Defaults to null.
Using a SfCalendarTheme
gives more fine-grained control over the
appearance of various components of the calendar.
See also:
- timeFormat, which is used to format the time text in the timeslotviews of the calendar.
- timeRulerSize, which is the size for the time ruler, which displays the time label in timeslot views of calendar.
- timeInterval, which is the duration of every single timeslot in the timeslot views of calendar.
- Knowledge base: How to customize time label
- Knowledge base: How to change the time interval width and height
- Knowledge base: How to format the view header day and date format
- Knowledge base: How to format the date and time in timeline views
Widget build(BuildContext context) {
return Container(
child: SfCalendar(
view: CalendarView.timelineWeek,
timeSlotViewSettings: TimeSlotViewSettings(
startHour: 10,
endHour: 20,
nonWorkingDays: <int>[
DateTime.saturday,
DateTime.sunday,
DateTime.friday
],
minimumAppointmentDuration: Duration(minutes: 30),
timeInterval: Duration(minutes: 120),
timeIntervalHeight: 80,
timeFormat: 'h:mm',
dateFormat: 'd',
dayFormat: 'EEE',
timeRulerSize: 70,
timeTextStyle: TextStyle(
fontSize: 15, fontStyle: FontStyle.italic,
color: Colors.grey)),
),
);
}
Implementation
final TextStyle? timeTextStyle;