lerp static method
Linearly interpolates between two styles.
Implementation
static HrStyle? lerp(HrStyle? a, HrStyle? b, double t) {
if (a == null && b == null) {
return null;
}
if (a == null) {
return t < 0.5 ? null : b;
}
if (b == null) {
return t < 0.5 ? a : null;
}
return HrStyle(
thickness: lerpDouble(a.thickness, b.thickness, t),
color: Color.lerp(a.color, b.color, t),
padding: EdgeInsetsGeometry.lerp(a.padding, b.padding, t),
);
}