of static method

The closest instance of this class's data value that encloses the given context.

If there is no ancestor, it returns ThemeData.bannerTheme. Applications can assume that the returned value will not be null.

Typical usage is as follows:

TabPanelThemeData theme = TabPanelTheme.of(context);

Implementation

static TabPanelThemeData of(BuildContext context) {
  final bannerTheme =
      context.dependOnInheritedWidgetOfExactType<TabPanelTheme>();
  return bannerTheme?.data ?? _defaultTabPanelTheme;
}