lerp method

  1. @override
StackSpec lerp(
  1. covariant StackSpec? other,
  2. double t
)
override

Linearly interpolate with another Spec object.

Implementation

@override
StackSpec lerp(StackSpec? other, double t) {
  if (other == null) return this;

  return StackSpec(
    alignment: AlignmentGeometry.lerp(alignment, other.alignment, t),
    fit: lerpSnap(fit, other.fit, t),
    textDirection: lerpSnap(textDirection, other.textDirection, t),
    clipBehavior: lerpSnap(clipBehavior, other.clipBehavior, t),
    animated: other.animated ?? animated,
  );
}