changeCameraType method

void changeCameraType(
  1. CameraType type
)

Implementation

void changeCameraType(CameraType type) {
  final canSwitch = type == CameraType.selfie &&
      value.lensDirection != CameraLensDirection.front;
  if (canSwitch) {
    switchCameraDirection(CameraLensDirection.front);
  }
  value = value.copyWith(cameraType: type);
}