of method Null safety

WeekdaySelectorThemeData? of(
  1. BuildContext context

The closest instance of this class that encloses the given context.

If there is no enclosing WeekdaySelectorTheme widget, then this method returns null.

Typical usage is as follows:

final MaterialWeekdaySelectorTheme theme = MaterialWeekdaySelectorTheme.of(context);


static WeekdaySelectorThemeData? of(BuildContext context) {
  final WeekdaySelectorTheme? theme =
  return theme?.data;