reset method
dynamic
reset(
- dynamic productCurve(
- dynamic Function(
- double x
- dynamic Function(
- AnimationController animationController,
- Duration duration,
- Tween<
Offset> tween, - Offset current,
- double target,
override
Implementation
@override
reset(
productCurve(Function(double x)),
AnimationController animationController,
Duration duration,
Tween<Offset> tween,
Offset current,
double target,
) {
// value-target
// value -0/1
tween.begin = current;
tween.end =
Offset(current.dx > 0 ? target : 0, current.dy > 0 ? target : 0);
productCurve((x) {
return curve.transform(x);
});
double value = animationController.value;
animationController.duration = duration * (max(value - target, .5));
animationController.forward(from: 0);
}