LerpableKeyFace class abstract interface

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.

Implemented types
Implementers

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

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.
inherited
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
lerpTo(KeyFaceRenderer other, double t) → KeyFaceRenderer
This face t of the way to other (t may exceed 1 slightly: the shape rubber-band to 1.06). other's layoutFace has this face's renderer type.
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
prepareLerp(KeyFaceRenderer other, Iterable<Size> cellSizes) → void
Builds what lerpTo faces toward other will paint (shape morphs) for keys of cellSizes, ahead of the transition.
toString() → String
A string representation of this object.
inherited

Operators

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