KeyStyleSpec class final
How key faces are drawn (spec §5.1 KeyStyle).
- Annotations
Constructors
- KeyStyleSpec({required KeyStyleKind kind, int outlineWidthCdp = 0, int extrudeDepthCdp = 0, int shadowOffsetCdp = 0, int shadowBlurCdp = 0, int opacityPermille = 1000, int edgeShadePermille = 0, int stateLayerPermille = 100, int frostPermille = 0, int highlightPermille = 0, int refractionPermille = 0})
-
const
- KeyStyleSpec.fromJson(Object? json)
-
factory
Properties
- edgeShadePermille → int
-
How much darker the extruded sides are than the face, × 1000 of OKLab
lightness (NeoPOP), when KeyColors.edge is derived at render time.
Reused: Claymorphism's inner shade, Y2K's deep band under the gloss
cap, Paper & ink's hatch opacity, Vaporwave's bevel shade.
final
- extrudeDepthCdp → int
-
Extruded side depth (NeoPOP), dp × 100.
final
- frostPermille → int
-
Glass: how much of the backdrop the glass diffuses × 1000 (0 = clear,
1000 = the solid tint). The renderer lays the background's base
colour under the tint at this opacity, so the face is still the tint
composited over a point of the background's colour hull (what the
guardrails sample). Liquid Glass only; serialised only when set, so
every other theme's canonical JSON and stable hash are unchanged.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- highlightPermille → int
-
Glass: specular highlight strength × 1000 (serialised only when set).
Also Y2K's gloss-cap alpha and Vaporwave's bevel-highlight mix.
final
- kind → KeyStyleKind
-
final
- opacityPermille → int
-
Face opacity × 1000 (glass < 1000).
final
- outlineWidthCdp → int
-
Outline / rim stroke width, dp × 100 (0 = none).
final
- refractionPermille → int
-
Glass: refraction hint strength × 1000 — edge lensing and dispersion
(serialised only when set). Also Y2K's caustic alpha.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shadowBlurCdp → int
-
Shadow blur radius, dp × 100 (0 = hard shadow).
final
- shadowOffsetCdp → int
-
Hard or soft shadow offset, dp × 100.
final
- stateLayerPermille → int
-
Pressed state-layer opacity × 1000 (M3E +10 %).
final
Methods
-
copyWith(
{KeyStyleKind? kind, int? outlineWidthCdp, int? extrudeDepthCdp, int? shadowOffsetCdp, int? shadowBlurCdp, int? opacityPermille, int? edgeShadePermille, int? stateLayerPermille, int? frostPermille, int? highlightPermille, int? refractionPermille}) → KeyStyleSpec -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, Object?> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override