onViewFinderTap method

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

Implementation

void onViewFinderTap(TapDownDetails details, BoxConstraints constraints) {
  if (controller == null) {
    return;
  }

  final Offset offset = Offset(
    details.localPosition.dx / constraints.maxWidth,
    details.localPosition.dy / constraints.maxHeight,
  );
  controller!.setExposurePoint(offset);
  controller!.setFocusPoint(offset);
}