appointmentTextStyle property
The text style for the text in the Appointment view in SfCalendar month agenda view.
Defaults to null.
Using a SfCalendarTheme
gives more fine-grained control over the
appearance of various components of the calendar.
See also:
- SfCalendar.appointmentBuilder, which used to set custom widget for appointment view in calendar
- dayTextStyle, which used to customize the day text in the agenda view of calendar.
- dateTextStyle, which used to customize the date text in the agenda view of calendar.
- backgroundColor, which fills the background of the agenda view in calendar.
- Knowledge base: How to customize the agenda view appointment
Widget build(BuildContext context) {
return Container(
child: SfCalendar(
view: CalendarView.month,
monthViewSettings: MonthViewSettings(
dayFormat: 'EEE',
numberOfWeeksInView: 4,
appointmentDisplayCount: 2,
appointmentDisplayMode: MonthAppointmentDisplayMode.appointment,
showAgenda: true,
navigationDirection: MonthNavigationDirection.horizontal,
agendaStyle: AgendaStyle(
backgroundColor: Colors.transparent,
appointmentTextStyle: TextStyle(
color: Colors.white,
fontSize: 13,
fontStyle: FontStyle.italic
),
dayTextStyle: TextStyle(color: Colors.red,
fontSize: 13,
fontStyle: FontStyle.italic),
dateTextStyle: TextStyle(color: Colors.red,
fontSize: 25,
fontWeight: FontWeight.bold,
fontStyle: FontStyle.normal)
)),
),
);
}
Implementation
final TextStyle? appointmentTextStyle;