initializeCamera method

Future<void> initializeCamera()

Initializes the camera for liveness detection.

This will request camera permissions if needed and start the camera preview with face detection.

Call this method when you want to manually start the camera.

Implementation

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