live_key library

Key pieces that follow the per-frame theme of a transition by repainting only (design doc "60 fps budget: keys repaint without relayout"): the face painter, the label tint, the press scale and the focus ring read CalcTheme.liveOf at paint time, so a theme morph never rebuilds a key or re-runs its label-sizing layout.

Classes

LiveKeyFacePainter
Paints a key with the renderer and colours of the current frame of theme: it delegates to theme.value.keyFace.painter(...), rebuilt only when the face or its spec changes.
LiveKeyFocusRingPainter
The focus ring in the per-frame colour, corner fraction and width of theme.
LiveLabelColor
The label colour of keys with role in the per-frame theme.
LiveLabelTint
Recolours child (a label drawn in baked) to color's current value by repainting: no layer while they agree (always, once a transition settles and the key rebuilds), a srcIn colour filter while a theme transition runs.
PressScale
Scales child about its centre by 1 + (scale − 1) × press, where scale is the per-frame theme's press scale, by repainting (a paint transform: no rebuild, no relayout). Replaces a ScaleTransition, whose per-tick rebuild inside the key's label-sizing LayoutBuilder re-ran that layout every press frame.
RenderLiveLabelTint
Render object of LiveLabelTint.
RenderPressScale
Render object of PressScale.

Extensions

LiveKeyFacePainterAccess on CustomPainter
Test and tooling access to a key face's renderer painter.