anchor.diff:      );
     }
   
  +  void animateScale(double from, double to){
  +    _scaleAnimation = new Tween<double>(
  +      begin: from,
  +      end: to,
  +    ).animate(_scaleAnimationController);
  +    _scaleAnimationController
  +      ..value = 0.0
  +      ..fling(velocity: 0.4);
  +  }
  +
  +  void animatePosition(Offset from, Offset to){
  +    _positionAnimation = new Tween<Offset>(
  +        begin: from,
  +        end: to
  +    ).animate(_positionAnimationController);
  +    _positionAnimationController
  +      ..value = 0.0
  +      ..fling(velocity: 0.4);
  +  }
  +
     @override
     void initState(){
       super.initState();
  
positive.code:       widget.onStartPanning();
      }
      setState(() {
        _scale = newScale.clamp(widget.minScale, widget.maxScale);
        _position = clampPosition(delta * (newScale / _scaleBefore)) / details.scale;
      });
    }
  
    void onScaleEnd(ScaleEndDetails details) {
    }
  
    Offset clampPosition(Offset offset) {
  
negative.code:     oldWidget.scaleType != widget.scaleType
          && widget.scaleType != PhotoViewScaleType.zooming
      ){
        animateScale(
            _scale == null ? getScaleForScaleType(
              imageInfo: widget.imageInfo,
              scaleType: PhotoViewScaleType.contained,
              size: MediaQuery.of(context).size
            ) : _scale,
            getScaleForScaleType(
                imageInfo: widget.imageInfo,
                scaleType: widget.scaleType,
                size: MediaQuery.of(context).size
            )
        );
        animatePosition(_position, Offset.zero);
      }
    }
  
  