CLToneStyle class abstract final

Recipe L2 — l'unico posto dove vive la matematica del chrome tonale.

Scala canonica:

  • soft (tinta): base opacitySoft (0.10) · hover opacityMuted (0.14) · press opacityMedium (0.20), colore = tono.
  • outline/ghost (stile shadcn): bg SEMPRE neutro (trasparente → grigio accent hover → accent scurito press); outline ha bordo SEMPRE grigio cardBorder. Il tono vive SOLO nel testo/icona (fg), mai in bordo/bg.
  • solid: hover/press scuriscono con Color.lerp(bg, black, 0.08/0.16).
  • link: solo testo = tono (hover scurito), nessun bg/bordo.

colored: false = percorso neutro (tono secondary + costruttori raw): testo primaryText; soft → scala muted; outline/ghost → overlay neutro + bordo cardBorder (outline).

Con state.disabled restituisce i colori idle: l'opacità disabled (theme.opacityDisabled) la applica il consumer sull'intero widget.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

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.
inherited

Static Methods

colorOf(CLTheme theme, CLTone tone) Color
Mappa un CLTone sul token colore del tema.
resolve(CLTheme theme, {required Color color, required CLVariant variant, CLPressableState state = const CLPressableState(), bool colored = true}) CLToneColors