Start a new topic

Call a Flutter function from index.php

I would like to make a more native look on the mobile application that I am making and once the user click a POI to open a native modal window instead of the plain HTML that currently slides from the right side.

Can I make a flutter function call from the javascreen click button and put on the flutter function the logic to open the modal window?


Or how I could present a modal window that's not that static and not to cover the total screen size?

1 Comment

Good morning,


In our flutter sample app -> https://github.com/Wikitude/wikitude-flutter-plugin-examples we have a sample (10_BrowsingPois_5_NativeDetailScreen) that shows you how to connect the javascript side with dart code once a POI is clicked.


As summary, you will have to add a callback in dart through our ArchitectWidget using the setJSONObjectReceivedCallback method and then, you will be able to call it from the javascript side by calling the AR.platform.sendJSONObject with an action and the data you need.


Regards,


Aitor.

Login or Signup to post a comment