flutter_r2u

Last updated:

0 purchases

flutter_r2u Image
flutter_r2u Images
Add to Cart

Description:

flutter r2u

flutter_r2u #
R2U Augmented Reality SDK for Flutter, currently in beta.
Methods #
class R2U {
static Future<void> init({customerId: String}) async;
static Future<bool> deviceSupportsAR() async;
static Future<bool> isActive(String sku) async;
static Future<void> openAR({sku: String, resize = false}) async;
static Future<String> getLink(String sku) async;
}
copied to clipboard



function
description




init
Instantiates the R2U module to gather needed information from our API


isActive
Indicates the availability of a product in augmented reality


deviceSupportsAR
Displays the compatibility of a device with the AR experience *


openAR
Tries to display given SKU model inside the AR experience


getLink
Returns the URL to display the 3D model inside a webview



* List of supported devices = iOS & Android
Installation #

Add the package flutter_r2u to your pubspec.yaml under dependencies.
Install it with fluter pub get

Additional steps #
iOS

Add camera access permission request on your Info.plist

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "___">
<plist version="1.0">
<dict>
<key>NSCameraUsageDescription</key>
<string>Camera used to display product in Augmented Reality</string>
...
</dict>
</plist>
copied to clipboard

Install the React Native pod

cd ios
pod install
copied to clipboard
Android

Add camera access permission request on your AndroidManifest.xml

<uses-permission android:name="android.permission.CAMERA" />

<application …>
...
<!-- "AR Optional" app, contains non-AR features that can be used when
"Google Play Services for AR" (ARCore) is not available. -->
<meta-data android:name="com.google.ar.core" android:value="optional" />
</application>
copied to clipboard
Code example #
Check out the examples folder of this repository

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.