lerp method

Linearly interpolate between two TextBoneBorderRadius

Implementation

TextBoneBorderRadius lerp(TextBoneBorderRadius? other, double t) {
  if (other == null) return this;
  if (usesHeightFactor && other.usesHeightFactor) {
    return TextBoneBorderRadius.fromHeightFactor(
      lerpDouble(_heightPercentage!, other._heightPercentage!, t)!,
    );
  } else if (!usesHeightFactor && !other.usesHeightFactor) {
    return TextBoneBorderRadius(
      BorderRadiusGeometry.lerp(_borderRadius, other._borderRadius, t)!,
    );
  } else {
    return this;
  }
}