calc_theme library

Classes

AnimatedCalcTheme
A CalcTheme that animates to a new data over duration (theme transitions: a brightness change now, theme switches in M3), in step with Material's own AnimatedTheme.
CalcBackdrop
Paints a theme's calculator background (M3 BackgroundSpecs); the implementations live in lib/themes/render/background_painter.dart.
CalcTheme
Provides CalcThemeData to the calculator widgets.
CalcThemeData
Everything the calculator widgets read for their look: resolved colours, key shape, type and the press-motion subset. M3 produces it from a ThemeSpec; M2 has PlainTheme.
CalcThemeDataTween
Interpolates two CalcThemeDatas with CalcThemeData.lerp.
ChromeStyle
One family's chrome recipe. Fonts come from the theme: headings, titles and labels use its key font; body text uses bodyFont (null = the key font too).
DisplayEntry
A family's display glyph entry: start scale / offset and its spring.
DisplayFace
Draws display glyphs and the display panel for a theme family.
DisplayPanelPainter
Paints a DisplayFace's panel behind the display.
FaceText
One line of display text drawn with a DisplayFace: a Text replacement (no wrapping, no text scaling) for faces that paint glyphs.
FixedCalcTheme
A ValueListenable that never changes (a CalcTheme without a live theme). Equal when the data is equal, so painters built from it compare cheaply.
KeyCellSizes
The key-face sizes the keypad lays out now, published by each key on layout. Theme prefetch prepares renderers for them (key-shape morphs), so no commit or transition frame builds one (design doc "60 fps budget: no Morph construction in commit frames").
KeyFaceMotion
A key's animation channels, as a KeyFaceRenderer reads them (the calculator's KeyPressMotion implements it).
KeyFaceMotionDetail
Extra channels a KeyFaceMotion may also provide (the calculator's KeyPressMotion does). Renderers must still work without them (test fakes, previews): check with motion is KeyFaceMotionDetail.
KeyFaceRenderer
Draws key faces for a theme: the seam M3's ThemeSpec renderers plug into (CalcThemeData.keyFace), so the keypad widget never names a concrete painter.
KeyFaceSpec
What a KeyFaceRenderer draws one key with.
KeyFocusRingPainter
Paints the keyboard focus ring just outside the key face (motion brief §4.1: it appears instantly, no animation).
KeyLabel
A one-line key label drawn exactly in style.
KeyStyle
Colours and label weight for one group of keys.
LerpableKeyFace
A key face that can morph toward another face of the same renderer during a theme transition (motion brief §6.4: one tree, FlatMorph shapes). Renderers that implement it get their shapes interpolated at the transition's shape progress; others switch at the midpoint.
LiveBackdropPainter
Paints the calculator background — the per-frame theme's background colour and its backdrop (gradient / pattern) — by repainting only.
PlainKeyFace
The plain theme's key faces: PlainKeyPainter.
PlainKeyPainter
Paints the plain-theme key face: a rounded-rect fill (and optional outline) with the hover and pressed state layers, plus the long-press radial fill (motion brief §2.2.4, §4.1, §4.4).
RenderFaceText
Render object of FaceText.
ThemeLayer
A rebuild boundary for a theme-dependent layer (toolbar, display, chip): widgets below it that read the full per-frame theme (CalcTheme.of) rebuild inside this layer's own build scope during a transition, so the screen's layout above it is never re-run (design doc: "theme widgets rebuild only theme-dependent layers").

Enums

CalcThemeAspect
What a CalcTheme dependent rebuilds for.
DisplayEntryKind
How a newly typed display glyph enters (motion brief §2.3, §4.2).
KeyRole
What a key is, for styling (theme colours and label weight) and sounds.