headerStyle property
Sets the style for customizing the SfCalendar header view.
Allows to customize the CalendarHeaderStyle.textStyle, CalendarHeaderStyle.textAlign and CalendarHeaderStyle.backgroundColor in header view of calendar.
See also:
- CalendarHeaderStyle, to know about the available customization options for header view.
- headerHeight, to customize the size of the header view in calendar.
- headerDateFormat, to format the date string in the header view of calendar.
- Knowledge base: How to style a header
- Knowledge base: How to add custom header and view header
Widget build(BuildContext context) {
return Container(
child: SfCalendar(
view: CalendarView.week,
headerStyle: CalendarHeaderStyle(
textStyle: TextStyle(color: Colors.red, fontSize: 20),
textAlign: TextAlign.center,
backgroundColor: Colors.blue),
),
);
}
Implementation
final CalendarHeaderStyle headerStyle;