Flutter Quickstart¶
SceneView provides a Flutter plugin that bridges to native SceneView rendering on both Android (Filament) and iOS (RealityKit).
Install¶
Note: the plugin is published on pub.dev as
flutter_sceneview. The pub.dev packages namedsceneviewandsceneview_flutterare unrelated third-party uploads — do not use them.
Usage¶
3D Scene¶
import 'package:flutter_sceneview/flutter_sceneview.dart';
class MyModelViewer extends StatelessWidget {
@override
Widget build(BuildContext context) {
return SceneView(
onSceneCreated: (controller) {
controller.loadModel(ModelNode(
modelPath: 'models/damaged_helmet.glb',
scale: 1.0,
));
controller.setEnvironment('environments/sky_2k.hdr');
},
);
}
}
AR Scene¶
ARSceneView(
onSceneCreated: (controller) {
controller.loadModel(ModelNode(
modelPath: 'models/chair.glb',
scale: 0.5,
));
},
);
How It Works¶
Flutter (Dart)
└── PlatformView
├── Android → ComposeView → SceneView { ModelNode(...) }
└── iOS → UIHostingController → SceneView { ModelNode(...) }
- Android: Uses
ComposeViewhosting the Jetpack ComposeSceneView { }composable with Filament renderer - iOS: Uses
UIHostingControllerhosting the SwiftUISceneView { }with RealityKit renderer
Available Methods¶
| Method | Description |
|---|---|
loadModel(ModelNode) |
Load a glTF/GLB (Android) or USDZ (iOS) model |
clearScene() |
Remove all models from the scene |
setEnvironment(hdrPath) |
Set HDR environment lighting |
Limitations¶
- AR requires platform-specific permissions (camera)
- Model format differs: glTF/GLB on Android, USDZ on iOS
- Gesture handling is delegated to the native layer