switchCamera method

void switchCamera()

Implementation

void switchCamera() {
  if (CameraManager().currentFacingMode == "user") {
    switchToBackCamera();
  } else {
    switchToFrontCamera();
  }
}