zoom method

Future<void> zoom(
  1. double scale
)

Implementation

Future<void> zoom(double scale) async {
  if (maxAvailableZoom == minAvailableZoom) {
    return;
  }
  if (recordDetectTimer?.isActive ?? false) {
    return;
  }
  final double zoom = (baseZoom * scale).clamp(
    minAvailableZoom,
    maxAvailableZoom,
  );
  if (zoom == currentZoom) {
    return;
  }
  currentZoom = zoom;
  try {
    await controller.setZoomLevel(currentZoom);
  } catch (e, s) {
    handleErrorWithHandler(e, pickerConfig.onError, s: s);
  }
}