fairbid_flutter

Last updated:

0 purchases

fairbid_flutter Image
fairbid_flutter Images
Add to Cart

Description:

fairbid flutter

fairbid_flutter #
Unofficial plugin for FairBid SDK from Fyber - the advertisement mediation platform. Supports banner, interstitial and rewarded video ads.
Getting Started #
Before you start you need to be at least familiar with FairBid SDK official documentation. Topics you should be familiar with:

publisher's console - to configure apps and prepare ad placements
mediation networks integration - to learn how to setup your Android/iOS projects to provide additional mediation platforms
ad types provided by FairBid SDK - to know what suits your needs and how to use different ad types

SDK setup #
Create account Publishers UI and create configurations for Android and/or iOS app. App Ids has to be used to initialize SDK as described on official documentation for Android and iOS. You need to pass App Id for the platform your app is running on.
var appId = Platform.isAndroid ? _ANDROID_APP_ID : _IOS_APP_ID;
sdk = FairBid.forOptions(Options(
appId: appId
));
copied to clipboard
You should keep reference to the FairBid instance to create ad placement holders.
Full screen ads #

Initialize ad holder with placement id for the correct platform.

var interstitialPlacementId = Platform.isAndroid ? _ANDROID_INTERSTITIAL_PLACEMENT_ID : _IOS_INTERSTITIAL_PLACEMENT_ID;
var interstitialAd = sdk.prepareInterstitial(interstitialPlacementId);

var rewardedPlacementId = Platform.isAndroid ? _ANDROID_REWARDED_PLACEMENT_ID : _IOS_REWARDED_PLACEMENT_ID;
var rewardedAd = sdk.prepareRewarded(rewardedPlacementId);
copied to clipboard

Request for a fill for an ad.

await ad.request();
copied to clipboard

Please note that the completion of request() doesn't mean the ad is available but only that requesting process has been started.


Check if there is a fill available.

var adAvailable = await ad.isAvailable();
copied to clipboard

Show ad when fill is available.

await ad.show();
copied to clipboard
Banner ads #

Initialize ad holder with placement id for the correct platform.

var bannerPlacementId = Platform.isAndroid ? _ANDROID_BANNER_PLACEMENT_ID : _IOS_BANNER_PLACEMENT_ID;
var bannerAd = sdk.prepareBanner(bannerPlacementId);
copied to clipboard

Load and show banner on the screen.

await bannerAd.show(alignment: BannerAlignment.top);
copied to clipboard

Banners would show immediately and refresh automatically when ready.


When banner should not be visible on the screen it should be destroyed.

await bannerAd.destroy();
copied to clipboard

Donate #
You can show that you appreciate my work by sending a donation.

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.