SDK · Flutter 3.19+
Flutter AI ads SDK.
Flutter package for monetizing Flutter AI chatbots and agent apps. Single codebase ships to iOS, Android, and web.
Install
flutter pub add surfacedd
Import
import 'package:surfacedd/surfacedd.dart';
Initialize
await Surfacedd.configure(appId: 'app_xxx');
Fetch a sponsored answer
SponsoredAnswer(context: AdContext(query: userMessage))
Features
- pub.dev distribution
- SponsoredAnswer widget + imperative Dart API
- Single codebase: iOS, Android, and Flutter web
- Null-safety, sound type system, Dart 3+
- Platform-appropriate disclosure styling
Install in three steps
- Add the package. Run flutter pub add surfacedd. The package declares itself in your pubspec.yaml and fetches on the next build.
- Configure. Call await Surfacedd.configure(appId: "app_xxx") before runApp() in your main.dart.
- Render in your chat UI. Drop SponsoredAnswer(context: AdContext(query: userMessage)) inside your chat ListView, Column, or Slivers. The widget handles fetching and rendering.
Frequently asked questions
Which Flutter versions are supported?
Flutter 3.19 and above, Dart 3.3 and above. The SDK uses the new language features and targets the stable channel.
Does it work on Flutter web?
Yes. The SDK ships platform-conditional code so the same widget renders natively on iOS/Android and via DOM on web. API surface is identical.
Does the SDK impact Flutter app size?
The SDK adds approximately 110 KB to your iOS and Android release build. No native plugins required beyond the shared HTTP layer, so no extra Pod or Gradle dependencies.
Related SDKs
Ready to ship ads in your Flutter app?
Join the waitlist for SDK access. 60% revenue share, no minimums, no contracts.