of static method
Retrieves the GlassTheme from the widget tree.
Throws if no GlassTheme ancestor exists. Use maybeOf for a null-safe alternative.
Implementation
static GlassTheme of(BuildContext context) {
final theme = maybeOf(context);
assert(
theme != null,
'No GlassTheme found in context. '
'Wrap your app with GlassTheme to provide theme configuration.',
);
return theme!;
}