# pauseDetection method

Future<void> pauseDetection()

Pauses camera preview and face detection.

This will pause the camera preview and stop processing frames for face detection. The camera remains initialized and can be resumed later.

Useful when you want to temporarily stop liveness checking without disposing the camera.

## Implementation

    Future<void> pauseDetection() async {
      if (_onPauseDetection != null) {
        await _onPauseDetection!();
      } else {
        debugPrint(
          'LivenessCheckController: Pause callback not registered. '
          'Make sure the controller is attached to LivenessCheckScreen.',
        );
      }
    }