setCameraZoomRatio method

Future<int?> setCameraZoomRatio(
  1. double value
)

Set the zoom factor (focal length) of camera (supports only the Android and iOS platforms)

The value range is 15. 1 indicates the furthest view (normal lens), and 5 indicates the nearest view (enlarging lens). We recommend you set the maximum value to 5. If the maximum value is greater than 5, the video will become blurry.

Parameters:

value Value range: 15. The greater the value, the further the focal length

Returned value. 0: success; negative number: failure

Implementation

Future<int?> setCameraZoomRatio(
    double value // Value range: 1–5. The greater the value, the further the focal length
    ) {
  return _channel.invokeMethod('setCameraZoomRatio', {
    "value": value,
  });
}