anchor.diff:      });
     }
   
  +  void handleRotationAnimation() {
  +    setState(() {
  +      _rotation = _rotationAnimation.value;
  +    });
  +  }
  +
     void onScaleStart(ScaleStartDetails details) {
  +    _rotationBefore = _rotation;
       _scaleBefore = scaleStateAwareScale();
       _normalizedPosition = details.focalPoint - _position;
       _scaleAnimationController.stop();
       _positionAnimationController.stop();
  +    _rotationAnimationController.stop();
     }
   
     void onScaleUpdate(ScaleUpdateDetails details) {
  
positive.code:     setState(() {
        _scale = newScale;
        _position = clampPosition(delta * details.scale);
      });
    }
  
  
negative.code:       ..translate(_position.dx, _position.dy)
        ..scale(scaleStateAwareScale());
  
      final rotationMatrix = Matrix4.identity()
        ..rotateZ(_rotation);
  
      return GestureDetector(
        child: Container(
          child: Center(
            child: Transform(
              child: Transform(
                child: CustomSingleChildLayout(
                  delegate: ImagePositionDelegate(widget.imageInfo.image.width / 1,
                      widget.imageInfo.image.height / 1),
                  child: _buildHero(),
                ),
                transform: rotationMatrix,
                alignment: Alignment.center,	              origin: _rotationFocusPoint,
              ),
              transform: matrix,
              alignment: Alignment.center,
            )
          ),
          decoration: BoxDecoration(color: widget.backgroundColor),
        ),
        onDoubleTap: computeNextScaleState,
  