LumenStyle class

Kit visual effect tokens: shadow, fill, surface, border and background.

Independent of colors (LumenPalette) — any style works with any palette. Use a preset (neon, flat, glass, soft, brutal) or adjust via copyWith:

AppTheme.fromPreset(LumenPreset.matrix, style: LumenStyle.flat);
Annotations

Constructors

LumenStyle({LumenShadowKind shadow = LumenShadowKind.glow, double shadowStrength = 1, bool gradients = true, double surfaceOpacity = 1, double blurSigma = 0, double radiusScale = 1, double borderScale = 1, double borderOpacity = 1, LumenBackgroundKind background = LumenBackgroundKind.grid, bool orbs = true})
Creates a custom style.
const

Properties

background → LumenBackgroundKind
Background decoration.
final
blurSigma → double
Background blur used by frost.
final
borderOpacity → double
Border opacity multiplier used by borderAll.
final
borderScale → double
Border width multiplier used by borderAll.
final
gradients → bool
Whether fill preserves gradients instead of using their first color.
final
hashCode → int
The hash code for this object.
no setterinherited
orbs → bool
Whether the animated background draws its default glow orbs.
final
radiusScale → double
Corner radius multiplier for components that scale their radius.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
shadow → LumenShadowKind
Shadow treatment for effects that follow this style.
final
shadowStrength → double
Opacity multiplier used by glow and elevation shadows.
final
surfaceOpacity → double
Opacity multiplier for surfaces that use surfaceAlpha.
final

Methods

borderAll({Color color = const Color(0xFF000000), double width = 1}) → Border
Uniform border with style-adjusted thickness and opacity.
copyWith({LumenShadowKind? shadow, double? shadowStrength, bool? gradients, double? surfaceOpacity, double? blurSigma, double? radiusScale, double? borderScale, double? borderOpacity, LumenBackgroundKind? background, bool? orbs}) → LumenStyle
Returns a new style preserving unspecified tokens.
fill(Gradient? gradient) → Gradient?
Fill gradient; turns solid color when gradients is false.
frost({required Widget child, BorderRadius? borderRadius}) → Widget
Wraps a surface with background blur when blurSigma > 0.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
radius(double r) → BorderRadius
Corner radius scaled by radiusScale.
shadows(List<BoxShadow>? glows) → List<BoxShadow>?
Adapts shadows written in a neon (glow) look to the current style. Small glows (blur < 10, e.g. status points) are decorative and only exist in style LumenShadowKind.glow.
surfaceAlpha(double alpha) → double
Opacity of a surface adjusted by surfaceOpacity.
toString() → String
A string representation of this object.
inherited

Operators

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

Static Methods

of(BuildContext context) → LumenStyle
Resolves the active style through LumenThemeExt.of.

Constants

brutal → const LumenStyle
Straight corners, thick border and offset hard shadow.
flat → const LumenStyle
Neutral shadows, solid fills, and a plain background pattern.
glass → const LumenStyle
Frosted glass: translucent surfaces with blur and soft glow.
neon → const LumenStyle
Original look: colorful glow, gradients, grid and orbs.
presets → const Map<String, LumenStyle>
All presets, in displayed order.
soft → const LumenStyle
Rounded corners, diffuse shadows, and no borders drawn by borderAll.