From d2730d75bcaa8e8a86d6148b2eb36a610bcd6683 Mon Sep 17 00:00:00 2001 From: Manuito83 Date: Sun, 6 Mar 2022 14:59:14 +0100 Subject: [PATCH] Fixes zoomBy with floats --- ios/Classes/InAppWebViewMethodHandler.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/Classes/InAppWebViewMethodHandler.swift b/ios/Classes/InAppWebViewMethodHandler.swift index 58092f63..b8ec2723 100644 --- a/ios/Classes/InAppWebViewMethodHandler.swift +++ b/ios/Classes/InAppWebViewMethodHandler.swift @@ -289,7 +289,7 @@ public class InAppWebViewMethodHandler: FlutterMethodCallDelegate { result(webView?.getContentHeight()) break case "zoomBy": - let zoomFactor = arguments!["zoomFactor"] as! Float + let zoomFactor = (arguments!["zoomFactor"] as! NSNumber).floatValue let animated = arguments!["iosAnimated"] as! Bool webView?.zoomBy(zoomFactor: zoomFactor, animated: animated) result(true)