headerStyle property Null safety

CalendarHeaderStyle headerStyle
final

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.

header with different style in calendar

See also: CalendarHeaderStyle.

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;