AdHub
adhub is a Flutter package that simplifies multi-network ad integration through a remote JSON configuration. One unified API handles Google AdMob and AppLovin MAX — with built-in app versioning, maintenance mode, network resilience, and lifecycle utilities.
What does this package do?
| Feature | Description |
|---|---|
| 📡 Remote JSON Config | All ad IDs, flags, and version rules fetched from your own URL |
| 📱 Banner Ads | Google AdMob + AppLovin MAX |
| 🎬 Interstitial Ads | Google AdMob + AppLovin MAX |
| 💰 Rewarded Ads | Google AdMob + AppLovin MAX |
| 🎁 Rewarded Interstitial | Google AdMob |
| 🖼️ Native Ads | Google AdMob |
| 🔄 AdLoader Overlay | Full-screen loading spinner while ads load |
| 🔔 OneSignal Push | Auto-initialised from JSON |
| ⭐ In-App Review | Timer-based rate-us prompt |
| 🛡️ Maintenance Mode | Server-side kill-switch — blocks app with a custom message |
| 🌐 Network Resilience | 10-second timeout + retry dialog |
| 🔼 Force/Soft Update | Version-gate users to the latest release |
Installation
To add this package to your Flutter project, run:
flutter pub add adhub
Ad Index
When configuring actions in your JSON, use the following integer index to select which ad network and format to use:
| Index | Ad Network | Format |
|---|---|---|
0 |
Google AdMob | Interstitial |
1 |
Google AdMob | Rewarded |
2 |
Google AdMob | Rewarded Interstitial |
3 |
AppLovin MAX | Interstitial |
4 |
AppLovin MAX | Rewarded |
License
MIT © Raj Narola
Libraries
- adhub
- adplugin/AdLoader/ad_loader
- adplugin/AdLoader/ad_loader_provider
- adplugin/Ads/FullScreen/Ads
- adplugin/Ads/Native/native_ad
- adplugin/AdsWidget/AppLovin/Interstitial/applovin_interstitial
- adplugin/AdsWidget/AppLovin/Rewarded/applovin_rewarded
- adplugin/AdsWidget/Google/Interstitial/google_interstitial
- adplugin/AdsWidget/Google/Native/google_native
- adplugin/AdsWidget/Google/Rewarded Interstitial/google_rewarded_interstitial
- adplugin/AdsWidget/Google/Rewarded/google_rewarded
- adplugin/MainJson/main_json
- adplugin/Methods/base_class
- adplugin/Methods/google_init
- adplugin/Methods/notification_manager
- adplugin/Provider/ad_plugin_provider
- adplugin/Utils/Alerts/adhub_dialogs
- adplugin/Utils/Alerts/rate_us
- adplugin/Utils/extensions