of static method
- BuildContext context
Returns the configuration data from the closest TabBarTheme ancestor. If there is no ancestor, it returns ThemeData.tabBarTheme.
Typical usage is as follows:
TabBarThemeData theme = TabBarTheme.of(context);
Implementation
static TabBarThemeData of(BuildContext context) {
final TabBarTheme? tabBarTheme = context.dependOnInheritedWidgetOfExactType<TabBarTheme>();
return tabBarTheme?.data ?? Theme.of(context).tabBarTheme;
}