setZoomLevel method

Future<void> setZoomLevel(
  1. double zoom
)

Set the zoom level for the selected camera.

The supplied zoom value should be between 1.0 and the maximum supported zoom level returned by the getMaxZoomLevel. Throws an CameraException when an illegal zoom level is suplied.

Implementation

Future<void> setZoomLevel(double zoom) {
  _throwIfNotInitialized('setZoomLevel');
  try {
    return CameraPlatform.instance.setZoomLevel(_cameraId, zoom);
  } on PlatformException catch (e) {
    throw CameraException(e.code, e.message);
  }
}