SheenThemeData class Foundation

The look of every sheen widget below a SheenTheme: brightness, colours, type and glass.

Build one from an accent colour with SheenThemeData.light or SheenThemeData.dark and change any part with copyWith:

final theme = SheenThemeData.light(accent: const Color(0xFFD6336C));
final calmer = theme.copyWith(colors: theme.colors.copyWith(background: const Color(0xFFF4F1EC)));

Spacing, corner radii, layout widths and motion are fixed constants (SheenSpace, SheenRadius, SheenLayout, SheenMotion), not part of the theme.

Mixed-in types
Annotations

Constructors

SheenThemeData.dark({Color accent = SheenColors.defaultDarkAccent, TargetPlatform? platform, bool reduceTransparency = false})
The dark theme; the parameters are those of SheenThemeData.light.
factory
SheenThemeData.light({Color accent = SheenColors.defaultLightAccent, TargetPlatform? platform, bool reduceTransparency = false})
The light theme.
factory
SheenThemeData.of(Brightness brightness, {Color? accent, TargetPlatform? platform, bool reduceTransparency = false})
SheenThemeData.light or SheenThemeData.dark for brightness; a null accent keeps that theme's default.
factory
SheenThemeData.raw({required Brightness brightness, required SheenColors colors, required SheenType type, required SheenGlassStyles glass, bool reduceTransparency = false})
A theme from its parts. Prefer SheenThemeData.light or SheenThemeData.dark, which keep the parts in step with one accent.
const

Properties

brightness → Brightness
Whether the theme is light or dark.
final
colors → SheenColors
The colours.
final
glass → SheenGlassStyles
The glass recipes.
final
hashCode → int
The hash code for this object.
no setteroverride
isDark → bool
Whether brightness is dark.
no setter
reduceTransparency → bool
Draws glass as opaque surfaces, with the same shape and rim but no blur.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
type → SheenType
The type scale.
final

Methods

copyWith({Brightness? brightness, SheenColors? colors, SheenType? type, SheenGlassStyles? glass, bool? reduceTransparency}) → SheenThemeData
A copy with the given parts replaced.
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) → String
A string representation of this object.
inherited
toStringShort() → String
A brief description of this object, usually just the runtimeType and the hashCode.
inherited

Operators

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

Static Methods

lerp(SheenThemeData a, SheenThemeData b, double t) → SheenThemeData
Blends a and b at t: colours and type blend; brightness, glass and reduceTransparency switch at the midpoint.