of static method
- BuildContext context
The nearest GlassThemeData, or the default for the ambient brightness.
Implementation
static GlassThemeData of(BuildContext context) {
final theme = context.dependOnInheritedWidgetOfExactType<GlassTheme>();
if (theme != null) return theme.data;
final brightness = _ambientBrightness(context);
return brightness == Brightness.dark ? _dark : _light;
}