rotateCovered method

void rotateCovered(
  1. double rotateZ, {
  2. required double scaleFloor,
})

Set the free rotation angle and re-cover the crop in one commit, never zooming below scaleFloor. Takes over a running spin from wherever it had reached, so a dial grab mid-quarter-turn continues under the finger.

Implementation

void rotateCovered(double rotateZ, {required double scaleFloor}) {
  final spinning = _renderAnimator.isAnimating;
  _settleAnimator.cancel();
  _renderAnimator.cancel();
  _renderSpin++;
  if (spinning) {
    final flipX = imageTransform.flipX;
    imageTransform
      ..update(_renderTransform)
      ..flipX = flipX;
  }
  imageTransform.update(_coveredAt(rotateZ, scaleFloor: scaleFloor));
}