lerp method
Returns the interpolated value for the given animation parameter t.
By default, this uses the +, -, and * operators on T.
Subclasses override this for types that do not support those operators.
Implementation
T lerp(double t) {
assert(begin != null, 'Tween.begin must not be null when lerp is called.');
assert(end != null, 'Tween.end must not be null when lerp is called.');
// ignore: avoid_dynamic_calls
return (begin as dynamic) + ((end as dynamic) - (begin as dynamic)) * t
as T;
}