lerp method

  1. @override
Rect lerp (double t)
override

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

Implementation

@override
Rect lerp(double t) {
  if (_dirty)
    _initialize();
  if (t == 0.0)
    return begin;
  if (t == 1.0)
    return end;
  final Offset center = _centerArc.lerp(t);
  final double width = lerpDouble(begin.width, end.width, t);
  final double height = lerpDouble(begin.height, end.height, t);
  return Rect.fromLTWH(center.dx - width / 2.0, center.dy - height / 2.0, width, height);
}