onScaleStart method
Implementation
void onScaleStart(ScaleStartDetails details) {
//Dont start the effect if the image havent reset complete.
if (_controllerReset.isAnimating) {
return;
}
if (widget.twoTouchOnly && _touchCount < 2) {
return;
}
_startFocalPoint = details.focalPoint;
_matrix = Matrix4.identity();
// create an matrix of where the image is on the screen for the overlay
final renderBox = context.findRenderObject() as RenderBox;
final position = renderBox.localToGlobal(Offset.zero);
_transformMatrix = Matrix4.translation(
v3.Vector3(position.dx, position.dy, 0),
);
show();
setState(() {
_isZooming = true;
});
}