of static method
Implementation
static GBThemeData of(BuildContext context) {
_GBInheritedTheme? inheritedTheme;
GBThemeData theme;
try {
inheritedTheme = context.dependOnInheritedWidgetOfExactType<_GBInheritedTheme>();
if (inheritedTheme == null) {
final _theme = Theme.of(context);
if (_theme is GBThemeData) {
return _theme;
}
}
} catch (e) {}
theme = inheritedTheme?.theme.data ?? GBThemeExtension.dataOf(context) ?? _kFallbackTheme;
return theme;
}