lerp static method
Linearly interpolates between two styles.
Implementation
static CheckboxStyle? lerp(CheckboxStyle? a, CheckboxStyle? 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 CheckboxStyle(
size: lerpDouble(a.size, b.size, t),
checkedColor: Color.lerp(a.checkedColor, b.checkedColor, t),
uncheckedColor: Color.lerp(a.uncheckedColor, b.uncheckedColor, t),
checkColor: Color.lerp(a.checkColor, b.checkColor, t),
borderRadius: Radius.lerp(a.borderRadius, b.borderRadius, t),
gapAfterBox: lerpDouble(a.gapAfterBox, b.gapAfterBox, t),
interactive: t < 0.5 ? a.interactive : b.interactive,
);
}