deepar_flutter 0.0.5 icon indicating copy to clipboard operation
deepar_flutter: ^0.0.5 copied to clipboard

Official Flutter SDK for DeepAR

This plugin is the official SDK for DeepAR. Platforms supported: Android & iOS.

The current version of plugin supports:

  • Live AR previews ✅
  • Take screenshots ✅
  • Record Videos ✅
  • Flip camera ✅
  • Toggle Flash ✅
Support Android iOS
SDK 23+ iOS 13.0+

Installation #

Please visit our developer website to create a project and generate your separate license keys for both platforms.

Once done, please add the latest deepar_flutter dependency to your pubspec.yaml.


  1. compileSdkVersion should be 33 or more.
  2. minSdkVersion should be 23 or more.
  3. Download the native android dependencies from our downloads section and paste it in your flutter project at android/app/libs/deepar.aar.
  4. Make sure to pub clean & flutter pub upgrade to fetch latest working code.

Also add the following permission requests in your AndroidManifest.xml

<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"  />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-permission android:name="Manifest.permission.CAPTURE_AUDIO_OUTPUT"  />
<uses-permission android:name="android.permission.CAMERA" />

Ensure to add these rules to else app might crash in release build

-keepclassmembers class { *; }
-keepclassmembers class { *; }
-keep class


  1. Ensure your app iOS deployment version is 13.0+.
  2. Do a flutter clean & install pods.
  3. To handle camera and microphone permissions, please add the following strings to your info.plist.
  4. Make sure to pub clean & flutter pub upgrade to fetch latest working code.
  1. Also add the following to your Podfile file:
post_install do |installer|
  installer.pods_project.targets.each do |target|
    ... # Here are some configurations automatically generated by flutter

    # Start of the deepar configuration
    target.build_configurations.each do |config|

	  config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [

        ## dart:

        ## dart: PermissionGroup.microphone

    # End of the permission_handler configuration


  1. Initialize DeepArController by passing in your license keys for both platforms.
final  DeepArController _controller = DeepArController();
	androidLicenseKey:"---android key---",
	iosLicenseKey:"---iOS key---",
	resolution: Resolution.high);
  1. Place the DeepArPreview widget in your widget tree to display the preview.

Widget  build(BuildContext  context) {
return  _controller.isInitialized
		? DeepArPreview(_controller)
		: const  Center(
			child: Text("Loading Preview")

To display the preview in full screen, wrap DeepArPreview with Transform.scale() and use the correct scale factor as per preview area size. More info here.

  1. Load effect of your choice by passing the asset file to it in switchPreview
  1. To take a picture, use takeScreenshot() which return the picture as file.
final File file = await _controller.takeScreenshot();
  1. To record a video, please use :
if (_controller.isRecording) {
} else {
final File videoFile = _controller.startVideoRecording();

For more info, please visit: Developer Help.