FloaticaGlassEffect class

Configuration for glassmorphism / Liquid Glass effect.

Provides both classic glassmorphism and iOS 26–style Liquid Glass effects. Use the named constructors for quick presets:

Constructors

FloaticaGlassEffect({double blur = 10.0, double opacity = 0.2, Color? tintColor, Gradient? gradient, Color? borderColor, double borderWidth = 1.0, bool enableShadow = true, Color? shadowColor, double shadowBlur = 10.0, double shadowSpread = 0.0, bool specularHighlight = false, bool innerShadow = false, double saturationBoost = 1.0, double noiseOpacity = 0.0, LiquidGlassVariant variant = LiquidGlassVariant.regular})
Creates a glassmorphism effect configuration.
const
FloaticaGlassEffect.dark({double blur = 20.0, double opacity = 0.3, Color? tintColor, Gradient? gradient = const LinearGradient(begin: Alignment.topLeft, end: Alignment.bottomRight, colors: [Color(0x4D2A2A2A), Color(0x661A1A1A), Color(0x802A2A2A)]), Color? borderColor = const Color(0x33FFFFFF), double borderWidth = 0.5, bool enableShadow = true, Color? shadowColor = const Color(0x40000000), double shadowBlur = 15.0, double shadowSpread = 2.0, bool specularHighlight = false, bool innerShadow = false, double saturationBoost = 1.0, double noiseOpacity = 0.0, LiquidGlassVariant variant = LiquidGlassVariant.regular})
Creates a dark glass effect preset with gradient.
const
FloaticaGlassEffect.light({double blur = 15.0, double opacity = 0.15, Color? tintColor, Gradient? gradient = const LinearGradient(begin: Alignment.topLeft, end: Alignment.bottomRight, colors: [Color(0x40FFFFFF), Color(0x26FFFFFF), Color(0x40FFFFFF)]), Color? borderColor = const Color(0x40FFFFFF), double borderWidth = 1.0, bool enableShadow = true, Color? shadowColor = const Color(0x20000000), double shadowBlur = 10.0, double shadowSpread = 0.0, bool specularHighlight = false, bool innerShadow = false, double saturationBoost = 1.0, double noiseOpacity = 0.0, LiquidGlassVariant variant = LiquidGlassVariant.regular})
Creates a light glass effect preset with gradient.
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.
const
FloaticaGlassEffect.liquidGlassClear({double blur = 18.0, double opacity = 0.06, Color? tintColor, Gradient? gradient = const LinearGradient(begin: Alignment.topLeft, end: Alignment.bottomRight, colors: [Color(0x18FFFFFF), Color(0x0CFFFFFF), Color(0x08FFFFFF), Color(0x14FFFFFF)], stops: [0.0, 0.3, 0.7, 1.0]), Color? borderColor = const Color(0x38FFFFFF), double borderWidth = 0.5, bool enableShadow = true, Color? shadowColor = const Color(0x20000000), double shadowBlur = 12.0, double shadowSpread = 0.0, bool specularHighlight = true, bool innerShadow = false, double saturationBoost = 1.15, double noiseOpacity = 0.02, LiquidGlassVariant variant = LiquidGlassVariant.clear})
Creates an iOS 26–style clear Liquid Glass effect.
const

Properties

blur double
The blur intensity for the glass effect.
final
borderColor Color?
Optional border color for the glass effect.
final
borderWidth double
Border width for the glass effect.
final
enableShadow bool
Whether to enable shadow on the glass container.
final
gradient Gradient?
Optional gradient for the glass effect. Takes precedence over tintColor and opacity.
final
hashCode int
The hash code for this object.
no setterinherited
innerShadow bool
Whether to enable an inner shadow for added depth.
final
noiseOpacity double
Opacity of the frosted noise texture overlay (0.0 to 1.0).
final
opacity double
The opacity of the glass overlay (0.0 to 1.0). Only used when gradient is null.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
saturationBoost double
Saturation multiplier for the blurred background content.
final
shadowBlur double
Shadow blur radius.
final
shadowColor Color?
Shadow color for the glass effect.
final
shadowSpread double
Shadow spread radius.
final
specularHighlight bool
Whether to enable a specular highlight on the top edge.
final
tintColor Color?
Optional tint color for the glass effect. Only used when gradient is null.
final
variant LiquidGlassVariant
The Liquid Glass variant (regular or clear).
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited