zoom method

  1. @override
Future<ScreenshotResult> zoom({
  1. required Map<String, num> regionLogical,
  2. required List<String> allowedBundleIds,
  3. int? displayId,
})
override

Implementation

@override
Future<ScreenshotResult> zoom({
  required Map<String, num> regionLogical,
  required List<String> allowedBundleIds,
  int? displayId,
}) async {
  final d = await getDisplaySize(displayId);
  final w = regionLogical['w']?.toInt() ?? 100;
  final h = regionLogical['h']?.toInt() ?? 100;
  final targetDims = _computeTargetDims(w, h, d.scaleFactor);
  // Would call Swift captureRegion
  return ScreenshotResult(
    base64: '',
    width: targetDims[0],
    height: targetDims[1],
  );
}