GlassStyle class

How a piece of glass looks, beyond its shape.

Annotations

Constructors

GlassStyle.new({required Color tint, required Color edge, required Color drop, required double rimShine, required double blur, required double saturation, required double bend, required double dispersion, double brightness = 1, LensSpec spec = LensSpec.glass, LensRim rim = LensRim.glass, double amount = 1, GlassMode mode = GlassMode.auto, double magnification = 1, Offset magnifyOffset = Offset.zero})
Creates a glass style from its colours, frost and lens.
const

Properties

amount → double
How far the glass bends now, from 0 to 1.
final
bend → double
The lens's strength, overriding spec's.
final
blur → double
The frost's blur, a deviation in logical px.
final
brightness → double
How much the glass brightens what it shows; 1 for no change.
final
dispersion → double
How much further red bends than blue, as LensSpec.dispersion.
final
drop → Color
The colour of the glass's small drop shadow.
final
edge → Color
The colour of the 0.5px line round the glass's edge.
final
hashCode → int
The hash code for this object.
no setteroverride
magnification → double
How much the glass magnifies what's under its middle; 1 for none.
final
magnifyOffset → Offset
Where the magnified spot lies from the glass's middle, in local px.
final
mode → GlassMode
How the glass reads what's behind it.
final
rim → LensRim
The rim painted over the glass.
final
rimShine → double
How bright the painted rim is.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
saturation → double
How much the glass saturates what it shows; 1 for no change.
final
spec → LensSpec
How the lens bends.
final
tint → Color
The frost laid over what the glass shows.
final

Methods

copyWith({Color? tint, Color? edge, Color? drop, double? rimShine, double? blur, double? saturation, double? brightness, double? bend, double? dispersion, LensSpec? spec, LensRim? rim, double? amount, GlassMode? mode, double? magnification, Offset? magnifyOffset}) → GlassStyle
A copy with the given fields replaced.
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