ThemedKeyFace class abstract

Base for ThemeSpec-driven key renderers: labels use the theme's bundled variable font with its weight on the wght axis (Flutter does not map fontWeight onto variable axes reliably), tabular figures, and an optional slashed zero.

Inheritance
Implementers
Annotations

Constructors

ThemedKeyFace({bool slashedZero = false})
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
layoutFace → KeyFaceRenderer
The renderer that decides the key's widgets (label, label layer): itself, or for an in-between face of a theme morph the end it is closer to. Compared by CalcThemeData.sameLayout.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
slashedZero → bool
Draw 0 with a slash (fonts that support zero).
final

Methods

label(String text, TextStyle style) → Widget
The label widget for text in style (already sized, coloured and weighted, Bold Text included). Not scaled by the text scaler: the key size bounds it.
override
labelLayer(KeyFaceMotion motion, KeyFaceSpec spec, Widget label) → Widget
Places label on the face for the press (NeoPOP moves it with the face). Must follow motion by repainting, never by rebuilding. The default leaves it centred.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
painter(KeyFaceMotion motion, KeyFaceSpec spec) → CustomPainter
The painter behind the label: fill, state layers, long-press fill. It should repaint from motion's listenable without rebuilds.
inherited
prepare(Iterable<Size> cellSizes) → void
Builds whatever the painter would otherwise build lazily (key-shape morphs) for keys of cellSizes, ahead of a theme commit: called on keypad layout and when a theme enters the prefetch queue. The default does nothing.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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