setZoomLevel method
Set the zoom level for the selected camera.
The supplied zoom
value should be between the minimum and the maximum supported
zoom level returned by getMinZoomLevel
and getMaxZoomLevel
. Throws a CameraException
when an illegal zoom level is supplied.
Implementation
@override
Future<void> setZoomLevel(int cameraId, double zoom) async {
try {
getCamera(cameraId).setZoomLevel(zoom);
} on html.DomException catch (e) {
throw CameraException(e.name, e.message);
} on PlatformException catch (e) {
throw CameraException(e.code, e.message);
} on CameraWebException catch (e) {
_addCameraErrorEvent(e);
throw CameraException(e.code.toString(), e.description);
}
}