lerp static method
Interpolates between two progress styles for animated theme transitions.
Implementation
static FdcProgressBarStyle lerp(
FdcProgressBarStyle? a,
FdcProgressBarStyle? b,
double t,
) {
final left = a ?? defaults;
final right = b ?? defaults;
return FdcProgressBarStyle(
height: lerpDouble(left.height, right.height, t),
borderRadius: t < 0.5 ? left.borderRadius : right.borderRadius,
trackColor: Color.lerp(left.trackColor, right.trackColor, t),
valueColor: Color.lerp(left.valueColor, right.valueColor, t),
indeterminateValueColor: Color.lerp(
left.indeterminateValueColor,
right.indeterminateValueColor,
t,
),
backgroundBorder: t < 0.5
? left.backgroundBorder
: right.backgroundBorder,
animationDuration: t < 0.5
? left.animationDuration
: right.animationDuration,
reserveSpaceWhenIdle: t < 0.5
? left.reserveSpaceWhenIdle
: right.reserveSpaceWhenIdle,
visibilityDelay: t < 0.5 ? left.visibilityDelay : right.visibilityDelay,
pollInterval: t < 0.5 ? left.pollInterval : right.pollInterval,
displayMode: t < 0.5 ? left.displayMode : right.displayMode,
);
}