LiquidGlassSettings constructor
const
LiquidGlassSettings({
- double visibility = 1.0,
- Color glassColor = const Color.fromARGB(0, 255, 255, 255),
- double thickness = 20,
- double blur = 5,
- double frost = 0.0,
- double frostOpacity = 1.0,
- double frostClamp = 0.0,
- double frostWeight = 1.0,
- double blurWeight = 1.0,
- double chromaticAberration = .01,
- double lightAngle = GlassDefaults.lightAngle,
- double lightIntensity = .5,
- double ambientStrength = 0,
- double ambientRim = 0,
- double fresnelStrength = 1.0,
- double refractiveIndex = 1.2,
- double saturation = 1.5,
- double glowIntensity = 0.75,
- GlassSpecularSharpness specularSharpness = GlassSpecularSharpness.medium,
- double standardOpacityMultiplier = 1.0,
- double shadowElevation = 1.0,
- List<
BoxShadow> ? shadow, - double whitenStrength = 0.0,
- bool whitenGated = true,
- double edgeAbsorption = 0.0,
- double rimShade = 0.0,
- double rimShadeEnds = 0.2,
- double rimLight = 0.0,
- double bodyShade = 0.0,
- GlassLensModel lensModel = GlassLensModel.spherical,
- Color? backerColor,
- Color? platformViewFallbackColor,
- PlatformViewGlassMode platformViewMode = PlatformViewGlassMode.fallbackColor,
- GlassBodyMode bodyMode = GlassBodyMode.adaptive,
Creates a new LiquidGlassSettings with the given settings. Public constructor — all material glass properties.
pinchStrength is intentionally absent here. It is an internal
shader-transport value set only by AnimatedGlassIndicator via
copyWithPinch. Users configure the effect through the hosting
widget's indicatorPinchStrength parameter instead.
Implementation
const LiquidGlassSettings({
this.visibility = 1.0,
this.glassColor = const Color.fromARGB(0, 255, 255, 255),
this.thickness = 20,
this.blur = 5,
this.frost = 0.0,
this.frostOpacity = 1.0,
this.frostClamp = 0.0,
this.frostWeight = 1.0,
this.blurWeight = 1.0,
this.chromaticAberration = .01,
this.lightAngle = GlassDefaults.lightAngle,
this.lightIntensity = .5,
this.ambientStrength = 0,
this.ambientRim = 0,
this.fresnelStrength = 1.0,
this.refractiveIndex = 1.2,
this.saturation = 1.5,
this.glowIntensity = 0.75,
this.specularSharpness = GlassSpecularSharpness.medium,
this.standardOpacityMultiplier = 1.0,
this.shadowElevation = 1.0,
this.shadow,
this.whitenStrength = 0.0,
this.whitenGated = true,
this.edgeAbsorption = 0.0,
this.rimShade = 0.0,
this.rimShadeEnds = 0.2,
this.rimLight = 0.0,
this.bodyShade = 0.0,
this.lensModel = GlassLensModel.spherical,
this.backerColor,
this.platformViewFallbackColor,
this.platformViewMode = PlatformViewGlassMode.fallbackColor,
this.bodyMode = GlassBodyMode.adaptive,
}) : pinchStrength = 0.0;