Start a new topic

Show AR when reading QR code

Hello,


I am trying to create a Flutter app that will read a QR code, display AR and information contained in the QR code.

I am following the documentation on this page: https://www.wikitude.com/external/doc/documentation/latest/flutter/

and the barcode and QR code reader plugin cannot be found


Can I use the barcode reader plugin found in the following documentation?

https://www.wikitude.com/external/doc/documentation/latest/android/pluginsapi.html#barcode-and-qr-code-reader


Thanks,


Cesar

 

 

 

 


Hello,


Unfortunately that plugin is not compatible with our Flutter extension at the moment.


You will have to look for another Flutter package that reads QR codes, and trigger the AR content from our SDK separately.


- Damian

 

Hello,

For the part of scanning the QR code, I am using the package that you find in the following link, I already implemented it and it works perfectly:
Here I attach the image of it.

image


The question would be how to create an augmented reality scene to show the content of the scanned information.
Could you please help me ?

Hi,


You could add a function in your ARchitect world's JS that receives these items as parameters, and send them from dart through the callJavascript method in ArchitectWidget.


For instance, your JS could have a method like this:

var World = {
...
  handleValuesFromQR: function handleValuesFromQR(id, name, city) {
    // display values
  }
...
}


And you could feed it the values from your dart code like this:

this.architectWidget.callJavascript("World.handleValuesFromQR(\"" + id + "\",\"" + name + "\",\"" + city + "\");");


You can find some examples of calls like this one in lib/arview.dart, from our Flutter sample app.


- Damian

Hello,

Thanks for your reply.

I have tried to implement the code you suggested, but I don't know if it will be fine as I am doing, could you please guide me.


Here I attach the respective captures.

image


image


Could you please help me?

Thanks,

Cesar

 

 

js
(257 Bytes)
dart
(8.13 KB)

Hello,


I wonder if you could help me with this?


I added the function in your ARchitect world's JS that receives these items as parameters and send them from dart through the callJavascript method in ArchitectWidget.


Here I attach the JavaScript and Dart(arview.dart) functions.

image


image

The doubt is how I can create the augmented reality scene with the captured information.

image


Could you please help me?

Thanks,

Cesar

Login or Signup to post a comment