autoFocus method

Future<void> autoFocus()

Implementation

Future<void> autoFocus() async {
  _controller ??= await start();
  try {
    // In der Mitte fokussieren
    await _controller!.setFocusPoint(const Offset(0.5, 0.5));
    await _controller!.setExposurePoint(const Offset(0.5, 0.5));
  } catch (e) {
    debugPrint("Fehler beim automatischen Fokussieren: $e");
  }
}