Skip to main content

Before You Begin

SDK Initialization RequiredLoad or render all ad formats only after SDK initialization completes. Rendering ad widgets before initialization will cause ads not to display properly.Applies to all formats: banner, native, interstitial, rewarded, app open, light popup.
The Daro Flutter SDK currently supports Non-reward apps only.
Check requirements before integration.

Requirements

  • Flutter SDK ^3.24.0
  • Dart ^3.5.0
  • Android minSdkVersion: 23
  • iOS 13.0 or higher
Verify app-ads.txt settings before proceeding.

App Setup

Add Package

Add daro_flutter to your pubspec.yaml:
Install the package:

Android Project Setup

  • Android minSdkVersion: 23
Desugaring required: Configure desugaring if minSdk is below 26.

1

Project-level Build Configuration

  1. Add maven repositories to the allprojects block in the build.gradle(root) file.
2

Add the DARO plugin to build.gradle(root)

  1. Add the DARO plugin to the build.gradle(root) file.
Latest version
  • daro-plugin: 1.0.13
3

Add Daro SDK

  1. Add the Daro SDK to android/app/build.gradle.
Latest version
  • daro-a: 1.4.2
4

Add android-daro-key.txt file

  1. Add the android-daro-key.txt file.
android-daro-key.txt can be downloaded from the DARO dashboard.
5

Configure daroAppKey

  1. Configure the daroAppKey.
The daroAppKey can be found in the DARO dashboard.daroAppKey
6

Apply the DARO plugin in build.gradle(app)

  1. Apply the DARO plugin in build.gradle(app).

iOS Project Setup

  • iOS 13.0 or higher
  • Xcode 14.0 or higher
1

Install Pods

  1. Run pod install in the ios/ directory of your Flutter project.
2

Add ios-daro-key.txt file

  1. Open ios/Runner.xcworkspace and add the ios-daro-key.txt file by drag and drop.
The ios-daro-key.txt file must be included in the project to initialize the SDK.
ios-daro-key.txt can be downloaded from the DARO dashboard.
3

Info.plist Configuration

  1. Add the following IDs to Info.plist.
GADApplicationIdentifier, DaroAppKey can be found in the DARO dashboard (AdMob Key, App Key).
❗ Please copy the SKAdNetworkItems from Info.plist to your app’s Info.plist. If not registered, ad networks cannot receive conversion performance reports, which will reduce advertising efficiency. This has a significant impact on ad performance, so please add it!

Initialize SDK

Initialize the SDK using the code below:

Best Practices

SDK Initialization Management

Recommended practices to manage SDK efficiently and prevent errors.
  1. Call initialize() in the main() function
    • Initialize at the app entry point in the main() function
  2. Render ads after initialization completes
    • Render ad widgets only after await DaroFlutter.initialize() completes
  3. Display banner and native ad widgets after initialization
    • Ensure ad widgets don’t render before initialization completes