lerp method

  1. @override
Rect? lerp(
  1. double t
)
override

Returns the value this variable has at the given animation clock value.

Implementation

@override
Rect? lerp(double t) {
  final double elasticCurveValue = Curves.easeInOutCubic.transform(t);
  return Rect.fromLTRB(
    lerpDouble(begin!.left, end!.left, elasticCurveValue)!,
    lerpDouble(begin!.top, end!.top, elasticCurveValue)!,
    lerpDouble(begin!.right, end!.right, elasticCurveValue)!,
    lerpDouble(begin!.bottom, end!.bottom, elasticCurveValue)!,
  );
}