of static method

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

If there is no enclosing MacosPopupButtonTheme widget, then MacosThemeData.MacosPopupButtonTheme is used.

Typical usage is as follows:

MacosPopupButtonTheme theme = MacosPopupButtonTheme.of(context);

Implementation

static MacosPopupButtonThemeData of(BuildContext context) {
  final MacosPopupButtonTheme? buttonTheme =
      context.dependOnInheritedWidgetOfExactType<MacosPopupButtonTheme>();
  return buttonTheme?.data ?? MacosTheme.of(context).popupButtonTheme;
}