camera property

Camera? get camera

Implementation

Camera? get camera => _camera;
set camera (Camera? camera)

Implementation

set camera(Camera? camera) {
  if (camera == null) {
    throw('Invalid camera set to the ProjectedMaterial');
  }

  if (camera.type != _camera?.type) {
    throw('Cannot change camera type after the material has been created. Use another material.');
  }

  _camera = camera;
  _saveDimensions();
}