monthHeaderSettings property
Sets the style to customize month label in SfCalendar schedule view.
Allows to customize the MonthHeaderSettings.monthFormat,
MonthHeaderSettings.height, MonthHeaderSettings.textAlign,
MonthHeaderSettings.backgroundColor and
MonthHeaderSettings.labelTextStyle
in month label style of schedule view
in calendar.
See also:
- weekHeaderSettings, which used to customize the week header view of the schedule view in calendar.
- dayHeaderSettings, which used to customize the day header view of the schedule view in calendar.
- SfCalendar.scheduleViewMonthHeaderBuilder, which used to set custom widget for month header view of schedule view in calendar.
- Knowledge base: How to customize day, week, month header of schedule view
- Knowledge base: How to customize schedule view month header with builder
- Knowledge base: How to view schedule
- Knowledge base: How to customize the schedule view
@override
Widget build(BuildContext context) {
return Container(
child: SfCalendar(
view: CalendarView.schedule,
scheduleViewSettings: ScheduleViewSettings(
monthHeaderSettings: MonthHeaderSettings(
monthFormat: 'MMMM, yyyy',
height: 100,
textAlign: TextAlign.left,
backgroundColor: Colors.green,
monthTextStyle: TextStyle(
color: Colors.red,
fontSize: 25,
fontWeight: FontWeight.w400))),
),
);
}
Implementation
final MonthHeaderSettings monthHeaderSettings;