backgroundColor property

Color? backgroundColor
final

The color which fills the background of SfCalendar view header view.

Defaults to null.

Using a SfCalendarTheme gives more fine-grained control over the appearance of various components of the calendar.

See also:

  • dayTextStyle, which used to customize the text style of the day text in the view header view.
  • dateTextStyle, which used to customize the text style of the date text in the view header view.
  • SfCalendar.viewHeaderHeight, which customizes the size of the view header view in the calendar.
Widget build(BuildContext context) {
   return Container(
     child: SfCalendar(
       view: CalendarView.week,
       viewHeaderStyle: ViewHeaderStyle(
           backgroundColor: Colors.blue,
           dayTextStyle: TextStyle(color: Colors.grey, fontSize: 20),
           dateTextStyle: TextStyle(color: Colors.grey, fontSize: 25)),
     ),
   );
 }

Implementation

final Color? backgroundColor;