Last updated:
0 purchases
flutter yandex mobile ads
Flutter plugin for Yandex Mobile Ads SDK #
This plugin supports: #
Android: #
✅ Interstitial Ad
✅ Rewarded Video
✅ Banner
iOS: #
✅ Interstitial Ad
✅ Rewarded Video
✅ Banner
Installation #
To instrument your flutter based mobile application with Yandex Mobile Ads Plugin, add this to your package's pubspec.yaml file:
dependencies:
...
flutter_yandex_mobile_ads: ^0.0.12
copied to clipboard
Important note for iOS: #
Version 0.0.9 of this plugin uses pod YandexMobileAds version 5.4.0 which requires Swift 5.7 to build correctly.
Usage: #
Init #
Yandex.initialize();
copied to clipboard
Interstitial Ad #
Load #
listener(YandexAdEvent event, dynamic args) {
if (event == YandexAdEvent.adReady) {
interstitialLoaded = true;
} else if (event == YandexAdEvent.adLoadFailed) {
debugPrint("Failed to load Interstitial Ad");
}
}
Yandex.interstititalListener = listener;
Yandex.loadInterstitial("R-M-DEMO-interstitial");
copied to clipboard
Replace "R-M-DEMO-interstitial" with your placement key.
Show #
Yandex.showInterstitial();
copied to clipboard
Rewarded Video Ad #
Load and Show #
var listener = (YandexAdEvent event, dynamic args) {
if (event == YandexAdEvent.adReady) {
Yandex.showRewardedVideo();
} else if (event == YandexAdEvent.adLoadFailed) {
debugPrint("Failed to load Rewarded Video");
} else if (event == YandexAdEvent.adRewarded) {
debugPrint("Successfully rewarded");
}
};
Yandex.rewardedListener = listener;
Yandex.loadRewarded("R-M-DEMO-rewarded-client-side-rtb");
copied to clipboard
Replace "R-M-DEMO-rewarded-client-side-rtb" with your placement key.
Banner Ad #
YandexBanner(
adUnitId: "R-M-DEMO-300x250",
size: YandexBannerSize.stickySize(MediaQuery.of(context).size.width.toInt()),
)
copied to clipboard
or
YandexBanner(
adUnitId: "R-M-DEMO-300x250",
size: YandexBannerSize.flexibleSize(320, 320),
)
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.