backgroundColor property Null safety

Color? backgroundColor

The color that fills the background of the week number panel.

Defaults to null.

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

See also:

  • textStyle, which used to apply style for the text in the week number view in calendar.
Widget build(BuildContext context) {
   return Container(
     child: SfCalendar(
       view: CalendarView.month,
       showWeekNumber: true,
       weekNumberStyle: WeekNumberStyle(
           textStyle: TextStyle(color: Colors.grey, fontSize: 20),


final Color? backgroundColor;