GlassStyle class

One outer-bar glass material — every knob the bar shader exposes, in logical pixels.

Constructors

GlassStyle({double rim = 5.0, double curve = 1.0, double depth = 5.0, double dispersion = 0.08, double blur = 25.0, double saturation = 1.25, Color tint = const Color(0x75FFFFFF), double specular = 0.32, Offset light = const Offset(-0.55, -0.85), double edgeDark = 0.025, double shadow = 0.0, double shadowBlur = 0.0, Offset shadowOffset = Offset.zero})
const

Properties

blur → double
Frost radius; 0 is clear glass.
final
curve → double
How steeply the rim's surface tilts.
final
depth → double
Refraction displacement at the rim.
final
dispersion → double
Chromatic dispersion — how far red and blue are bent apart at the rim. This is the soap-bubble fringe; the bar keeps it near zero, the lens opens it with its speed.
final
edgeDark → double
Rim shade on the side facing away from the light.
final
hashCode → int
The hash code for this object.
no setteroverride
light → Offset
Light direction, in the surface's own xy.
final
rim → double
Width of the lensing rim.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
saturation → double
Saturation multiplier on what shows through.
final
shadow → double
Drop shadow alpha; 0 for none.
final
shadowBlur → double
final
shadowOffset → Offset
final
specular → double
Rim light strength.
final
tint → Color
Straight-alpha tint laid over the sampled page.
final

Methods

copyWith({double? rim, double? curve, double? depth, double? dispersion, double? blur, double? saturation, Color? tint, double? specular, Offset? light, double? edgeDark, double? shadow, double? shadowBlur, Offset? shadowOffset}) → GlassStyle
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.
override

Constants

clearCrystal → const GlassStyle
Crystal-clear zero-blur glass emphasizing razor-sharp refraction, pronounced rim highlights, and edge dispersion without obscuring underlying content.
deepRefraction → const GlassStyle
Heavy optical slab with deep refraction displacement, high frost diffusion, and pronounced light absorption.
frosted → const GlassStyle
The bar: measured against the iOS floating glass tab bar — a pristine, crystal-clear frost with lensing confined to a thin rim, lit from the top-left (the lit edge is the brighter one there), with soft downward ambient shadow.
prismaticCaustics → const GlassStyle
Classic Apple-style frosted glass with balanced diffusion, gentle rim specular, and subtle chromatic lensing. Vivid chromatic fringing with an amplified specular highlight and saturated light pass-through.