themeOverride property

GlassThemeData? themeOverride
final

An optional per-page GlassThemeData that overrides the app-level GlassTheme for all glass widgets within this screen.

Use this for screens that intentionally break from the app-wide glass aesthetic — for example, a more dramatic onboarding screen or a paywall:

GlassPage(
  background: myHeroImage,
  themeOverride: GlassThemeData(
    light: GlassThemeVariant(
      settings: GlassThemeSettings(blur: 2, glowIntensity: 0.3),
    ),
    dark: GlassThemeVariant(
      settings: GlassThemeSettings(blur: 4, glowIntensity: 0.6),
    ),
  ),
  child: Scaffold(...),
)

Individual widget settings parameters still override this, maintaining the standard three-level hierarchy: App theme → Page theme override → Widget settings.

When null (the default), the nearest GlassTheme ancestor is used.

Implementation

final GlassThemeData? themeOverride;