lerp method
Linearly interpolate with another Spec object.
Implementation
@override
BoxTestSpec lerp(
BoxTestSpec? other,
double t,
) {
if (other == null) return this;
return BoxTestSpec(
alignment: AlignmentGeometry.lerp(
alignment,
other.alignment,
t,
),
animated: t < 0.5 ? animated : other.animated,
clipBehavior: t < 0.5 ? clipBehavior : other.clipBehavior,
constraints: BoxConstraints.lerp(
constraints,
other.constraints,
t,
),
decoration: Decoration.lerp(
decoration,
other.decoration,
t,
),
foregroundDecoration: Decoration.lerp(
foregroundDecoration,
other.foregroundDecoration,
t,
),
height: lerpDouble(
height,
other.height,
t,
),
margin: EdgeInsetsGeometry.lerp(
margin,
other.margin,
t,
),
padding: EdgeInsetsGeometry.lerp(
padding,
other.padding,
t,
),
transform: Matrix4Tween(
begin: transform,
end: other.transform,
).lerp(t),
transformAlignment: AlignmentGeometry.lerp(
transformAlignment,
other.transformAlignment,
t,
),
width: lerpDouble(
width,
other.width,
t,
),
);
}