onViewFinderTap method

void onViewFinderTap(
  1. TapDownDetails details,
  2. BoxConstraints constraints
)

Implementation

void onViewFinderTap(
  TapDownDetails details,
  BoxConstraints constraints,
) {
  if (_controller == null) {
    return;
  }
  final CameraController cameraController = _controller!;
  final Offset offset = Offset(
    details.localPosition.dx / constraints.maxWidth,
    details.localPosition.dy / constraints.maxHeight,
  );
  cameraController.setExposurePoint(offset);
  cameraController.setFocusPoint(offset);
}