variantFor method
Retrieves the appropriate theme variant based on current brightness.
Automatically selects light or dark variant based on MediaQuery brightness. Individual widgets can use this to get theme-aware settings.
Implementation
GlassThemeVariant variantFor(BuildContext context) {
final brightness = MediaQuery.platformBrightnessOf(context);
return brightness == Brightness.dark ? dark : light;
}