KeyFaceRenderer class abstract

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.

Implementers
Annotations

Constructors

KeyFaceRenderer()
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 setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

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.
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.
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.
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.
toString() → String
A string representation of this object.
inherited

Operators

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