UnityMediation class

Constructors

UnityMediation()

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

getInitializationState() Future<InitializationState>
This method returns the current initialization state of the Unity Mediation service at runtime.
getInterstitialAdState(String adUnitId) Future<AdState>
This method returns the current AdState of the interstitial ad.
getRewardedAdState(String adUnitId) Future<AdState>
This method returns the current AdState of the requested ad.
initialize({required String gameId, Function? onComplete, dynamic onFailed(InitializationError error, String errorMessage)?}) Future<void>
Initializes the Unity Mediation. It is mandatory to call this method before any InterstitialAd and RewardedAd can load.
loadInterstitialAd({required String adUnitId, dynamic onComplete(String adUnitId)?, dynamic onFailed(String adUnitId, LoadError error, String errorMessage)?}) Future<void>
Load a placement to make it available to show. Ads generally take a few seconds to finish loading before they can be shown.
loadRewardedAd({required String adUnitId, dynamic onComplete(String adUnitId)?, dynamic onFailed(String adUnitId, LoadError error, String errorMessage)?}) Future<void>
Load a placement to make it available to show. Ads generally take a few seconds to finish loading before they can be shown.
showInterstitialAd({required String adUnitId, dynamic onStart(String adUnitId)?, dynamic onClick(String adUnitId)?, dynamic onClosed(String adUnitId)?, dynamic onFailed(String adUnitId, ShowError error, String errorMessage)?}) Future<void>
Show an interstitial Ad
showRewardedAd({required String adUnitId, dynamic onStart(String adUnitId)?, dynamic onClick(String adUnitId)?, dynamic onRewarded(String adUnitId, UnityMediationReward reward)?, dynamic onClosed(String adUnitId)?, dynamic onFailed(String adUnitId, ShowError error, String errorMessage)?, String? userId, String? customizedData}) Future<void>
Show a rewarded Ad.