vungle
A plugin for Flutter that supports loading and displaying interstitial and rewarded video ads using the Vungle SDK API.
Note: This plugin is in beta, and may still have a few issues and missing APIs. Feedback and Pull Requests are welcome.
Getting Started
Please go to the Vungle website to create account for your apps at first. You need add your apps there and you will get the app id and placement ids, then use this plugin in your flutter app to do the monetization.
Initialize the plugin
if (Platfrom.isAndroid) {
Vungle.init('[vungle_android_app_id]');
} else {
Vungle.init('[vungle_ios_app_id]');
}
Vungle.onInitializeListener = () {
}
Load Interstitial or rewarded video ads
Vungle.loadAd('[vungle_placement_id]');
Vungle.onAdPlayableListener = (placementId, playable) {
if(playable) {
}
}
Play Interstitial or rewarded video ads
if(Vungle.isAdPlayable('[your_placement_id]') {
Vungle.playAd(placementId);
}
Vungle.onAdStartedListener = (placementId) {
}
Vungle.onAdFinishedListener = (placementId, isCTAClicked, isCompletedView) {
}
Vungle.OnAdEndListener = (placementId) {
}
Vungle.OnAdViewedListener = (placementId) {
}
Vungle.OnAdClickedListener = (placementId) {
}
Vungle.OnAdRewardedListener = (placementId) {
}
Vungle.OnAdLeftApplicationListener = (placementId) {
}