Start a new topic

Help needed with implementing Pinch and Zoom in Flutter

Hi All,

I'm building a Geo AR app using Flutter as a proof of concept. I'm trying to implement pinch and zoom, but need some tips on where and how this can be best implemented. Demo and docs are good but give no tips on how to solve this. 

I tried the Flutter GestureDectector. It a kind of worked, but failed in finding a good way to synchronize the scale factor in Flutter and Wikitude to deliver a acceptabele experience for the user.

Help is much appreciated.

Kind regards,


ps. I'm using Flutter 1.22 with Wikitude 9.3.1 and run on the latest Android on S20 

Hi Niels,

Sorry for the late response. Maybe you could see in our demo how we are doing the 07_3dModels_4_SnapToScreen in combination with 07_3dModels_6_3dModelAtGeoLocation. In the first one we are getting some callbacks from the AR.Model object which are called onScaleBegan and onScaleChanged -> here you can see how we manage the pitch and zoom of an object. Of course, the gesture is being controlled by the SDK, in case you want to control it by yourself, you will have to implement it from the Flutter side and implement some communication between the flutter code and the javascript side.

In the second sample we show how to add the AR.Model in an AR.GeoObject with a location. The combination of both will provide you a model that can be scaled in a location.

Please let me know if this information is useful for you. In any other case, I will need a bit more of information about what are you trying to achieve.



Hello Aitor,

Thank you for your answer. The examples are not quite the same. I want to scale the complete AR world with pinch and zoom (including the camera). The examples however gave some direction to a possible solution. I discovered in de docs the on2FingerGestureStarted and on2FingerGestureEnded events on the AR.location object which look promising. Tomorrow I'll try if these events are sufficient enough for pinch and zoom.

Kind regards,


Login or Signup to post a comment