flutter_r2u 0.0.2 copy "flutter_r2u: ^0.0.2" to clipboard
flutter_r2u: ^0.0.2 copied to clipboard

A new flutter plugin project.

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;
}
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 #

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

Additional steps #

iOS

  1. 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>
  1. Install the React Native pod
cd ios
pod install

Android

  1. 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>

Code example #

Check out the examples folder of this repository

1
likes
90
pub points
0%
popularity

Publisher

verified publisherr2u.io

A new flutter plugin project.

Homepage

Documentation

API reference

License

unknown (LICENSE)

Dependencies

flutter, http

More

Packages that depend on flutter_r2u