switchCamera method

void switchCamera()

Swap the camera In and Out.

カメラのInとOutを入れ替えます。

Implementation

void switchCamera() {
  if (_engine == null) {
    throw Exception(
      "The engine is not initialized. [connect] the engine first.",
    );
  }
  _engine?.switchCamera();
  _cameraDirection = _cameraDirection == CameraDirection.cameraRear
      ? CameraDirection.cameraFront
      : CameraDirection.cameraRear;
  notifyListeners();
}