A Flutter plugin enabling collaborative Augmented Reality (AR) experiences with support for ARKit on iOS and ARCore on Android.
Special thanks to Oleksandr Leuschenko for the arkit_flutter_plugin and Gian Marco Di Francesco for the arcore_flutter_plugin, which served as the foundation for this project.
To add the plugin to your project, use:
flutter pub add ar_flutter_reloaded
Alternatively, add this to your pubspec.yaml
file and run flutter pub get
:
dependencies:
ar_flutter_reloaded: ^0.7.3
Include the plugin in your Dart code:
import 'package:ar_flutter_reloaded/ar_flutter_reloaded.dart';
If you encounter issues with camera permissions on iOS (e.g., a blank camera view), add the following configuration to the Podfile
in your app’s ios
directory:
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
target.build_configurations.each do |config|
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [
'$(inherited)',
'PERMISSION_CAMERA=1',
'PERMISSION_PHOTOS=1',
'PERMISSION_LOCATION=1',
'PERMISSION_SENSORS=1',
'PERMISSION_BLUETOOTH=1',
]
end
end
end
Explore these sample implementations to see the plugin in action:
Example Name | Description | Code Link |
---|---|---|
Debug Options | A simple AR scene with toggles for visualizing the world origin, feature points, and tracked planes. | View Code |
Local & Online Objects | Place GLTF/GLB objects from assets, the web, or your device. Modify their scale, position, and rotation interactively. | View Code |
Objects & Anchors on Planes | Tap on a plane to create an anchor with a 3D model attached to it. | View Code |
Object Transformation Gestures | Enables gestures to pan, rotate, or resize objects after placing them in the AR scene. | View Code |
Screenshots | Take snapshots of your AR scene using a screenshot function. | View Code |
Cloud Anchors | Share AR experiences across devices by uploading and downloading anchors using Google Cloud Anchor Service and Firebase. Requires additional setup. | View Code |
External Object Management | Uses Firestore to manage models and provides UI for selecting and placing objects. Requires Cloud Anchor Service and Firestore setup. | View Code |
For details on setting up Cloud Anchors, check the Cloud Anchor Setup Guide.
Contributions are always welcome! Here’s how you can help:
- Submit a pull request.
- Report issues or suggest features by opening an issue.
- Share your ideas in the discussions section.
Below is a high-level overview of the plugin’s architecture:
Unleash the power of Augmented Reality in your Flutter apps today! 🚀