of method Null safety

SfCalendarThemeData of(
  1. BuildContext context
)

The data from the closest SfCalendarTheme instance that encloses the given context.

Defaults to SfThemeData.calendarThemeData if there is no SfCalendarTheme in the given build context.

Implementation

static SfCalendarThemeData of(BuildContext context) {
  final SfCalendarTheme? sfCalendarTheme =
      context.dependOnInheritedWidgetOfExactType<SfCalendarTheme>();
  return sfCalendarTheme?.data ?? SfTheme.of(context).calendarThemeData;
}