Reliefs Docs
3D Visualisation SDK

Flutter

Embed the Reliefs 3D product viewer in a Flutter app.

Make sure you've read the Prerequisites first — you'll need your public key (pk_) and a product UUID.

Add the Reliefs SDK

Add the reliefs_sdk package to your pubspec.yaml.

terminal
flutter pub add reliefs_sdk

Configure your API key

On startup — in main(), before runApp — initialize the SDK with your key, the base URL, and your app ID (iOS Bundle ID / Android package name).

main.dart
import 'package:reliefs_sdk/reliefs_sdk.dart';

void main() {
  ReliefsSDK.instance.configure(
    apiKey: 'pk_live_your_key',
    baseUrl: 'https://api.reliefsapp.com',
    appId: 'com.your.app', // Bundle ID / package name → allowlist it under App IDs
  );
  runApp(const MyApp());
}

Register your app ID

Add your iOS Bundle ID and/or Android package name (e.g. com.your.app) to Allowed app IDs on the key, or requests from the app are rejected.

Show the 3D viewer

Drop in the branded ReliefsButton, or open the viewer directly.

product_page.dart
import 'package:reliefs_sdk/reliefs_sdk.dart';

// Option 1 — branded button (label + branding colors from the organization)
const ReliefsButton(productUuid: 'PRODUCT_UUID');

// Option 2 — open the viewer directly
await ReliefsSDK.instance.showProduct(context, productUuid: 'PRODUCT_UUID');

On this page