monetization_kit 1.0.0
monetization_kit: ^1.0.0 copied to clipboard
A complete Flutter monetization toolkit with AdMob ads, native ads, Firebase Analytics, Crashlytics, Remote Config, force updates, and utilities for production apps.
Monetization Kit #
A powerful Flutter monetization toolkit that combines AdMob ads, Firebase services, force updates, feedback reporting, analytics, remote config, and reusable monetization utilities into a single package.
Note
Always test your ad flows, Firebase setup, native ad factories, force update behavior, and feedback systems with test ad units before releasing to production.
Screenshots #
| Native Ads (Test Mode) | Ad Controls & Fullscreen Ads |
|---|---|
| [Status card with platform, Firebase, Remote Config and ads in test mode, plus small and medium native ads] | [Ad controls with disable ads and premium user toggles, preload all ads, and fullscreen ad buttons] |
Features #
Ads #
-
Banner Ads
-
Collapsible Banner Ads
-
Native Ads
- Small
- Medium
- Fullscreen
- Custom Factory Support
-
Native Popup Ads
-
Fullscreen Native Timer Ads
-
Interstitial Ads
-
Rewarded Ads
-
App Open Ads
-
App Resume Ads
Smart Ad Systems #
- Global Ad Controller
- Premium User Ad Disable
- Remote Ad Enable / Disable
- Ad Frequency Manager
- Placement Based Ad Logic
- Cooldown Management
- Retry System
- Auto Reload After Dismiss
- Ad Preload Manager
- Native Ad Cache System
- Default Shimmer Loading UI
- Smart Ad Fallback Logic
Firebase #
- Firebase Core
- Firebase Analytics
- Firebase Crashlytics
- Firebase Remote Config
Updates #
- Android In-App Update
- iOS App Store Update
- Force Update System
- Dynamic Update Dialog
Feedback System #
- Discord Webhook Integration
- Modern Feedback Screen
- Screenshot Attachment Support
- Automatic Device Information Collection
- Automatic App Information Collection
- Custom Metadata Support
Collected automatically:
- App Name
- App Version
- Build Number
- Platform
- Device Model
- Device ID
- User Agent
- Timestamp
Users only need to provide:
- Feedback Description
- Optional Screenshot
Installation #
dependencies:
monetization_kit: ^1.0.0
Initialize #
await MonetizationKit.initialize(
config: MonetizationConfig(
iosStoreId: 'YOUR_IOS_APP_STORE_ID',
adUnitIds: AdUnitIds(
androidBanner: 'ANDROID_BANNER_ID',
iosBanner: 'IOS_BANNER_ID',
androidInterstitial: 'ANDROID_INTERSTITIAL_ID',
iosInterstitial: 'IOS_INTERSTITIAL_ID',
androidRewarded: 'ANDROID_REWARDED_ID',
iosRewarded: 'IOS_REWARDED_ID',
androidAppOpen: 'ANDROID_APP_OPEN_ID',
iosAppOpen: 'IOS_APP_OPEN_ID',
androidNativeSmall: 'ANDROID_NATIVE_ID',
iosNativeSmall: 'IOS_NATIVE_ID',
androidNativeMedium: 'ANDROID_NATIVE_ID',
iosNativeMedium: 'IOS_NATIVE_ID',
androidNativeFull: 'ANDROID_NATIVE_ID',
iosNativeFull: 'IOS_NATIVE_ID',
),
),
);
Banner Ads #
const BannerAdWidget()
Native Ads #
Small Native #
const NativeAdWidget(
type: NativeAdType.small,
)
Medium Native #
const NativeAdWidget(
type: NativeAdType.medium,
)
Full Native #
const NativeAdWidget(
type: NativeAdType.full,
)
Fullscreen Native Timer Ad #
await FullscreenNativeTimerAd.show(
context,
duration: const Duration(
seconds: 10,
),
);
Native Popup Ad #
await NativePopupAd.show(
context,
type: NativeAdType.full,
);
Interstitial Ad #
await InterstitialAdService.show(
context: context,
);
Rewarded Ad #
await RewardedAdService.show(
onRewardEarned: (reward) {
print(reward.amount);
},
);
Premium User #
Disable ads for premium users:
AdController.setPremiumUser(true);
Disable Ads #
AdController.disableAds();
Enable again:
AdController.enableAds();
Force Update #
await ForceUpdateService.checkForUpdate(
context: context,
);
Analytics #
Screen Tracking #
await AnalyticsService.logScreenView(
screenName: 'HomeScreen',
);
Custom Event #
await AnalyticsService.logEvent(
name: 'generate_image_clicked',
);
Ad Impression #
await AnalyticsService.logAdImpression(
adType: 'interstitial',
);
Feedback Screen #
Navigator.push(
context,
MaterialPageRoute(
builder: (_) => const FeedbackScreen(
webhookUrl:
'YOUR_DISCORD_WEBHOOK_URL',
),
),
);
Discord Feedback Service #
final feedback =
DiscordFeedbackService(
webhookUrl:
'YOUR_DISCORD_WEBHOOK_URL',
);
await feedback.sendFeedback(
description:
'App crashes on scanner screen',
);
Remote Config Keys #
| Key | Type |
|---|---|
| ads_enabled | bool |
| banner_enabled | bool |
| interstitial_enabled | bool |
| rewarded_enabled | bool |
| native_enabled | bool |
| app_open_enabled | bool |
| interstitial_click_count | int |
| force_update | bool |
| force_update_android_version | int |
| force_update_ios_version | int |
| maintenance_mode | bool |
Native Ad Factory IDs #
Built-in factory IDs:
customNativeAd
customNativeAdSmall
fullscreenNativeAd
These factories are registered automatically by the monetization_kit Flutter
plugin on Android and iOS. You no longer need to copy the package's Kotlin or
Swift native ad factory reference files into each app project.
Android Native Setup #
Add your AdMob app ID in your app's android/app/src/main/AndroidManifest.xml:
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-xxxxxxxxxxxxxxxx~yyyyyyyyyy" />
Native ad factories and Android native ad layouts are built into this plugin. No manual Kotlin factory files or layout files are required in the app.
iOS Native Setup #
Add your AdMob app ID in your app's ios/Runner/Info.plist:
<key>GADApplicationIdentifier</key>
<string>ca-app-pub-xxxxxxxxxxxxxxxx~yyyyyyyyyy</string>
Native ad factories are built into this plugin. No manual Swift factory files are required in the app.
Included Systems #
- Retry Config
- Auto Preload
- Auto Reload
- App Resume Ads
- Native Cache
- Frequency Logic
- Cooldown Logic
- Dynamic Update Dialog
- Smart Ad Fallbacks
- Feedback Reporting
Example #
A complete example application is included inside:
example/
License #
MIT License