userStartZooming method

void userStartZooming()

when this methode is called if the user is not zooming in it zoom on the position where the user has tapped on else it show the image to the original size also it update scaling state

Implementation

void userStartZooming() {
  userScaleState();
  var x = -tapdetail.localPosition.dx * (_scale - 1);
  var y = -tapdetail.localPosition.dy * (_scale - 1);
  zoomed = Matrix4.identity()
    ..translate(x, y)
    ..scale(_scale);

  controller.value =
      controller.value.isIdentity() ? zoomed : Matrix4.identity();

  setBoxFit(controller.value.getMaxScaleOnAxis());

  notifyListeners();
}