FloaticaGlassEffect.liquidGlass constructor
const
FloaticaGlassEffect.liquidGlass({
- double blur = 25.0,
- double opacity = 0.12,
- Color? tintColor,
- Gradient? gradient = const LinearGradient(begin: Alignment.topLeft, end: Alignment.bottomRight, colors: [Color(0x30FFFFFF), Color(0x18FFFFFF), Color(0x10FFFFFF), Color(0x20FFFFFF)], stops: [0.0, 0.3, 0.7, 1.0]),
- Color? borderColor = const Color(0x50FFFFFF),
- double borderWidth = 0.5,
- bool enableShadow = true,
- Color? shadowColor = const Color(0x30000000),
- double shadowBlur = 20.0,
- double shadowSpread = 0.0,
- bool specularHighlight = true,
- bool innerShadow = true,
- double saturationBoost = 1.3,
- double noiseOpacity = 0.03,
- LiquidGlassVariant variant = LiquidGlassVariant.regular,
Creates an iOS 26–style regular Liquid Glass effect.
Features a multi-layer blur with specular highlights, inner shadow, subtle noise texture, and saturation boost to mimic the dynamic Liquid Glass material from iOS 26.
The regular variant blurs and adjusts the luminosity of background content to maintain legibility of text and foreground elements.
Implementation
const FloaticaGlassEffect.liquidGlass({
this.blur = 25.0,
this.opacity = 0.12,
this.tintColor,
this.gradient = const LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
Color(0x30FFFFFF),
Color(0x18FFFFFF),
Color(0x10FFFFFF),
Color(0x20FFFFFF),
],
stops: [0.0, 0.3, 0.7, 1.0],
),
this.borderColor = const Color(0x50FFFFFF),
this.borderWidth = 0.5,
this.enableShadow = true,
this.shadowColor = const Color(0x30000000),
this.shadowBlur = 20.0,
this.shadowSpread = 0.0,
this.specularHighlight = true,
this.innerShadow = true,
this.saturationBoost = 1.3,
this.noiseOpacity = 0.03,
this.variant = LiquidGlassVariant.regular,
});