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