Yodo Sdk
Installation
Import yodo sdk
import 'package:yodosdk/yodosdk.dart';
Init Yodo Sdk First
await Yodosdk.initSdk(
appId: "Your Yodo app key",
preLoadAds: true, // Preload App For Buffer
showPrivacyDialog: true, // Show Privacy Dialog
initAdCallback: InitAdCallback(
onSuccess: () {
// Todo Success Call Back
},
onError: (error) {
// Todo Error Call Back
},
),
);
Show Inter Ads
Yodosdk.loadAndShowInter(
fullScreenAdCallbacks: FullScreenAdCallbacks(
onLoad: (adId) {
// Todo Ads Loaded Callback
},
onAdLoadFail: (adId) {
// Todo Ads Load Fail Callback
},
onAdOpen: (adId) {
// Todo Ads Open Callback
},
onAdOpenFail: (adId) {
// Todo Ads Open Callback
},
onClose: (adId) {
// Todo Ads Close Callback
},
),
);
Show Reward Ads
Yodosdk.loadAndShowReward(
rewardAdCallbacks: RewardAdCallbacks(
onRewardEarned: (adId) {
// Todo Ads Reward Earned Callback
},
onLoad: (adId) {
// Todo Ads Loaded Callback
},
onAdLoadFail: (adId) {
// Todo Ads Load Fail Callback
},
onAdOpen: (adId) {
// Todo Ads Open Callback
},
onAdOpenFail: (adId) {
// Todo Ads Open Callback
},
onClose: (adId) {
// Todo Ads Close Callback
},
),
);
Show Reward Inter Ads
Yodosdk.loadAndShowRewardInter(
rewardAdCallbacks: RewardAdCallbacks(
onRewardEarned: (adId) {
// Todo Ads Reward Earned Callback
},
onLoad: (adId) {
// Todo Ads Loaded Callback
},
onAdLoadFail: (adId) {
// Todo Ads Load Fail Callback
},
onAdOpen: (adId) {
// Todo Ads Open Callback
},
onAdOpenFail: (adId) {
// Todo Ads Open Callback
},
onClose: (adId) {
// Todo Ads Close Callback
},
),
);
Show App Open Ads
Yodosdk.loadAndShowAppOpen(
fullScreenAdCallbacks: FullScreenAdCallbacks(
onLoad: (adId) {
// Todo Ads Loaded Callback
},
onAdLoadFail: (adId) {
// Todo Ads Load Fail Callback
},
onAdOpen: (adId) {
// Todo Ads Open Callback
},
onAdOpenFail: (adId) {
// Todo Ads Open Callback
},
onClose: (adId) {
// Todo Ads Close Callback
},
),
);
Show Native Ads
Yodosdk.getNative(
size: NativeSize.nativeLarge, // Native Container Size
nativeAdCallback: NativeAdCallback(
onLoad: () {
// Todo Ads Loaded Callback
},
onClosed: () {
// Todo Ads Close Callback
},
onLoadFailed: (errorMessage) {
// Todo Ads Load Fail Callback
},
),
),
Show Banner Ads
Yodosdk.getBanner(
size: BannerSize.adaptiveBanner, // Banner Size
bannerAdCallback: BannerAdCallback(
onLoad: () {
// Todo Ads Loaded Callback
},
onClosed: () {
// Todo Ads Close Callback
},
onLoadFailed: (errorMessage) {
// Todo Ads Load Fail Callback
},
onOpen: () {
// Todo Ads Open Callback
},
onOpenFail: (String error) {
// Todo Ads Open Fail Callback
},
),
);