How do I disable zoom in InAppWebView in Flutter?

2,075

Solution 1

initialOptions: InAppWebViewGroupOptions(
  crossPlatform: InAppWebViewOptions(
  supportZoom: false,
),

put it in crossPlatform:InAppWebViewOptions, according to the doc supportZoom is crossplatform Option

Solution 2

please find:

crossPlatform: InAppWebViewOptions(
    supportZoom:false, // adding this will disable the zoom
    //....
)
Share:
2,075
Simran Aswani
Author by

Simran Aswani

Updated on December 20, 2022

Comments

  • Simran Aswani
    Simran Aswani over 1 year

    I am using the flutter_inappwebview dependency for my Flutter App.

    I want to disable the zoom-in aspect for iOS but I couldn't understand how to do it while reading the docs. I saw they had a property for Android called supportZoom that can be set to true or false to enable and disable zooming.

    The only zooming related property I found in the In-appWebView iOS specifications was maximumZoomScale and minimumZoomScale but I can't understand how to implement this to disable zooming.

    Is there a way to achieve this for iOS?