build method
Returns the value of the curve at the given progress.
t is the progress of the animation, ranging from
0.0 (start) to 1.0 (end).
Implementation
double build(double t) {
switch (type) {
case 'ease-in-out':
return _EaseInOutCurve.build(t);
case 'linear':
return _LinearCurve.build(t);
case 'ease-in':
return _EaseInCurve.build(t);
case 'ease-out':
return _EaseOutCurve.build(t);
case 'ease-in-out-back':
return _EaseInOutBackCurve.build(t);
case 'ease-out-back':
return _EaseOutBackCurve.build(t);
case 'bounce-in':
return _BounceInCurve.build(t);
case 'bounce-out':
return _BounceOutCurve.build(t);
default:
throw UnimplementedError(
'Unknown curve type: $type',
);
}
}