FacebookAudienceNetwork class

All non-widget functions such as initialization, loading interstitial, in-stream and reward video ads are enclosed in this class.

Initialize the Facebook Audience Network by calling the static init function.

Constructors

FacebookAudienceNetwork()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

destroyInterstitialAd() Future<bool?>
Removes the Ad.
destroyRewardedVideoAd() Future<bool?>
Removes the rewarded video Ad.
init({String? testingId, bool iOSAdvertiserTrackingEnabled = false}) Future<bool?>
Initializes the Facebook Audience Network. testingId can be used to obtain test Ads.
loadInterstitialAd({String placementId = "YOUR_PLACEMENT_ID", dynamic listener(InterstitialAdResult, dynamic)?}) Future<bool?>
Loads an Interstitial Ad in background. Replace the default placementId with the one which you obtain by signing-up for Facebook Audience Network.
loadRewardedVideoAd({String placementId = "YOUR_PLACEMENT_ID", dynamic listener(RewardedVideoAdResult, dynamic)?}) Future<bool?>
Loads a rewarded video Ad in background. Replace the default placementId with the one which you obtain by signing-up for Facebook Audience Network.
showInterstitialAd({int? delay}) Future<bool?>
Shows an Interstitial Ad after it has been loaded. (This needs to be called only after calling loadInterstitialAd function). delay is in milliseconds.
showRewardedVideoAd({int delay = 0}) Future<bool?>
Shows a rewarded video Ad after it has been loaded. (This needs to be called only after calling loadRewardedVideoAd function). delay is in milliseconds.