GestureAnimation constructor
GestureAnimation(
- TickerProvider vsync, {
- GestureOffsetAnimationCallBack? offsetCallBack,
- GestureScaleAnimationCallBack? scaleCallBack,
Implementation
GestureAnimation(TickerProvider vsync,
{GestureOffsetAnimationCallBack? offsetCallBack,
GestureScaleAnimationCallBack? scaleCallBack}) {
if (offsetCallBack != null) {
_offsetController = AnimationController(vsync: vsync);
_offsetController!.addListener(() {
//print(_animation.value);
offsetCallBack(_offsetAnimation.value);
});
}
if (scaleCallBack != null) {
_scaleController = AnimationController(vsync: vsync);
_scaleController!.addListener(() {
scaleCallBack(_scaleAnimation.value);
});
}
}