Platform SDKs / Flutter

Flutter

Install and configure the Nosmai SDK in a Flutter app.

Install

Add the plugin to pubspec.yaml, then flutter pub get. It wraps the native iOS + Android SDKs — the camera, frames and inference stay native; only results cross to Dart.

dependencies:
  nosmai_moderation_sdk: ^1.0.0

Android — add the native library to your host app. The Android SDK ships as an AAR your app bundles directly:

  1. Download nosmai-detection.aar from the Android releases.
  2. Put it in android/app/libs/nosmai-detection.aar.
  3. In android/app/build.gradle.kts:
android {
  defaultConfig {
    minSdk = 24
    ndk { abiFilters += "arm64-v8a" }
  }
}
dependencies {
  implementation(files("libs/nosmai-detection.aar"))
}

iOS needs no extra step — pod install pulls the native SDK with the plugin.

Configure

Initialize once with your license key. It runs natively on a background thread.

import 'package:nosmai_moderation_sdk/nosmai_moderation_sdk.dart';

final res = await NosmaiModeration.initialize('NOSMAI-XXXX');
if (!res.success) debugPrint('Nosmai init failed: ${res.error}');

Requirements

  • Flutter 3 or later
  • Android minSdk 24 (arm64-v8a); iOS 14+ (arm64)
  • Camera permission in AndroidManifest.xml / NSCameraUsageDescription in Info.plist for live moderation
  • iOS App Store: set ITSAppUsesNonExemptEncryption = NO in Info.plist (the SDK only encrypts its own bundled models — export-compliance exempt)
  • Distribute Android as an App Bundle (AAB) — the SDK ships arm64-v8a only (won’t run on x86_64 emulators)

NOTE

Next: Moderation · Flutter — image, video, text and live usage.

Nosmai

We make advanced camera and AI technology accessible to every developer. By packaging hard problems into simple

developers
legal
newsletter

Product updates and release notes. No spam.

© 2026 nosmai, inc · all rights reserved