switchCameraDirection method

void switchCameraDirection(
  1. CameraLensDirection direction
)

Implementation

void switchCameraDirection(CameraLensDirection direction) {
  try {
    final description = value.cameras.firstWhereOrNull(
      (element) => element.lensDirection == direction,
    );
    createCamera(cameraDescription: description);
  } on CameraException catch (e) {
    _uiHandler.showExceptionSnackbar(e);
  }
}