fetchFromTo method
Determines the 2 TweenPercentages surrounding the current percentage (theta).
Implementation
Pair<TweenPercentage<T>, TweenPercentage<T>> fetchFromTo(double t) {
final a = _values.reversed.firstWhere(
(element) => element.percent < t * 100.0,
orElse: () => _values.first);
final b = _values.firstWhere((element) => element.percent >= t * 100.0,
orElse: () => _values.last);
return Pair(a, b);
}