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