m3eFaceFor function

M3eKeyFace m3eFaceFor(
  1. ThemeSpec spec
)

M3 Expressive renderer: rest shape → pressed rounded rect at the motion token's corner (30 % of the short side by default).

Implementation

M3eKeyFace m3eFaceFor(ThemeSpec spec) {
  final shape = spec.keyShape;
  return M3eKeyFace(
    restShape: restGeometry(shape),
    operatorShape: operatorGeometry(shape),
    pressedCornerPermille: spec.motion.cornerPermille > 0
        ? spec.motion.cornerPermille
        : shape.morphCornerPermille ?? 300,
    slashedZero: spec.type.slashedZero,
  );
}