of static method

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);

Implementation

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