requestFocusAndExposureOnPosition method

Future<void> requestFocusAndExposureOnPosition(
  1. Offset localPosition,
  2. BoxConstraints constraints, {
  3. bool lock = false,
})

Request to set the focus and the exposure point on the localPosition, lock to lock the exposure mode at the same time. 将对焦和曝光设置为给定的点 localPositionlock 控制是否同时锁定曝光模式。

Implementation

Future<void> requestFocusAndExposureOnPosition(
  Offset localPosition,
  BoxConstraints constraints, {
  bool lock = false,
}) async {
  // Only call exposure point updates when the controller is initialized.
  if (innerController?.value.isInitialized ?? false) {
    Feedback.forTap(context);
    await setExposureAndFocusPoint(localPosition, constraints);
    if (lock) {
      await switchExposureMode();
    }
  }
}