interpolateDate function Value interpolation
Returns an interpolator between the two dates a and b.
Note: A new Date instance is always returned for every evaluation of the interpolator, even though this has a known impact on performance.
Implementation
DateTime Function(num) interpolateDate(DateTime a, DateTime b) {
return (t) {
return DateTime.fromMillisecondsSinceEpoch(
(a.millisecondsSinceEpoch * (1 - t) + b.millisecondsSinceEpoch * t)
.truncate());
};
}