blackoutDatesTextStyle property Null safety

TextStyle? blackoutDatesTextStyle

Specifies the text style for the blackout dates text in SfCalendar, that can’t be selected. The specified text style overrides existing date text styles( MonthCellStyle.trailingDatesTextStyle, MonthCellStyle.leadingDatesTextStyle and MonthCellStyle.textStyle)

Defaults to null.

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

See also:

  • blackoutDates, which will add blackout dates to the calendar.
  • SfCalendarTheme, to handle theming with calendar for giving consistent look.
  • Knowledge base: (How to update blackout dates using onViewChanged)
  • Knowledge base: (How to add active dates)
  • Knowledge base: (How to customize the blackout dates )

Widget build(BuildContext context) {
   return MaterialApp(
     home: Scaffold(
       body: SfCalendar(
         view: CalendarView.month,
         blackoutDatesTextStyle: TextStyle(
            fontStyle: FontStyle.italic,
             fontWeight: FontWeight.w500,
             fontSize: 18,
             color: Colors.black54


final TextStyle? blackoutDatesTextStyle;