lerp static method
If both are null
, returns null
.
If either is null
, replaced with Peek.NONE.
Implementation
static Peek? lerp(Peek? a, Peek? b, double t) {
if (a == null && b == null) return null;
a ??= Peek.NONE;
b ??= Peek.NONE;
return Peek(
peek: ui.lerpDouble(a.peek, b.peek, t)!,
ratio: ui.lerpDouble(a.ratio, b.ratio, t)!,
alignment: AlignmentGeometry.lerp(a.alignment, b.alignment, t)!,
);
}