augmented_reality_plugin 4.0.1 copy "augmented_reality_plugin: ^4.0.1" to clipboard
augmented_reality_plugin: ^4.0.1 copied to clipboard

Flutter Augmented Reality Plugin for iOS and Android Applications.

augmented_reality_plugin Flutter Package for Augmented Reality: for iOS & Android Platform #

pub package

augmented_reality_plugin is an augmented reality flutter ios and android application package for mobile devices that enables to build augmented reality applications.

Thanks to Muhammad Ali from Coding Cafe for the help in making this augmented_reality_plugin.

Features #

  • Display the Live Camera Preview.
  • Customize Camera, Place any object, anywhere on the Screen.
  • Choose objects in png or jpg.
  • Resize, Drag, Rotate, Zoom In and Out any Object.
  • and Much More...

Getting Started #

Installing #

Add the Flutter package to your project by running:

flutter pub add augmented_reality_plugin

Or manually add this to your pubspec.yaml file (and run flutter pub get):

  augmented_reality_plugin: ^4.0.1

iOS #

augmented_reality_plugin functionality works on iOS 10.0 or higher. If compiling for any version lower than 10.0, make sure to programmatically check the version of iOS running on the device before using any camera plugin features.

Add two rows to the ios/Runner/Info.plist:

  • one with the key Privacy - Camera Usage Description and a usage description.
  • and one with the key Privacy - Microphone Usage Description and a usage description.

Or in text format add the key:

<string>Can I use the camera please?</string>
<string>Can I use the mic please?</string>

Android #

Change the minimum Android sdk version to 24 (or higher) in your android/app/build.gradle file.

minSdkVersion 24

Always test app on your real phone and not emulators/simulators. It's important to note that the MediaRecorder class is not working properly on emulators, as stated in the documentation: Specifically, when recording a video with sound enabled and trying to play it back, the duration won't be correct and you will only see the first frame.

Importing #

Add this to your code:

import 'package:augmented_reality_plugin/augmented_reality_plugin.dart';

Usage or How to Use #

Replace your Scaffold to AugmentedRealityPlugin(), and it will handle all your view. if you want to pass an image just pass an image as a constructor.

#Write this code in main

import 'package:camera/camera.dart';
import 'package:flutter/material.dart';

List<CameraDescription> allCameras = [];
Future<void> main() async {
  try {
    allCameras = await availableCameras();
  } on CameraException catch (errorMessage) {
  runApp(const MyApp());

Add main class #

class AugmentedRealityView extends StatefulWidget {
  const AugmentedRealityView({Key? key}) : super(key: key);

  _AugmentedRealityViewState createState() => _AugmentedRealityViewState();

class _AugmentedRealityViewState extends State<AugmentedRealityView> {
  Widget build(BuildContext context) {
    return AugmentedRealityPlugin(
pub points


unverified uploader

Flutter Augmented Reality Plugin for iOS and Android Applications.

Repository (GitHub)
View/report issues


API reference




camera, flutter


Packages that depend on augmented_reality_plugin