GestureAnimation constructor

GestureAnimation(
  1. TickerProvider vsync, {
  2. GestureOffsetAnimationCallBack? offsetCallBack,
  3. 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);
    });
  }
}