lerp static method
Linearly interpolates between two styles.
Implementation
static ListStyle? lerp(ListStyle? a, ListStyle? 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 ListStyle(
bulletSize: lerpDouble(a.bulletSize, b.bulletSize, t),
bulletColor: Color.lerp(a.bulletColor, b.bulletColor, t),
bulletShape: t < 0.5 ? a.bulletShape : b.bulletShape,
markerTextStyle: TextStyle.lerp(a.markerTextStyle, b.markerTextStyle, t),
indent: lerpDouble(a.indent, b.indent, t),
gapAfterMarker: lerpDouble(a.gapAfterMarker, b.gapAfterMarker, t),
);
}