Appodeal class
Appodeal SDK Flutter Plugin main class.
This class declares the public API for the Appodeal SDK Flutter Plugin.
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 Properties
- ConsentForm → AppodealConsentForm
-
Appodeal Consent form logic for iAB TCFv2 and Google UMP.
no setter
Static Methods
-
cache(
AppodealAdType adType) → dynamic -
Starts caching ads for
adType
. -
canShow(
AppodealAdType adType, [String placement = "default"]) → Future< bool> -
Checks if an ad with a specific
adType
can be shown withplacement
. -
destroy(
AppodealAdType adType) → dynamic -
Destroys
adType
advertising. -
disableNetwork(
String network, [AppodealAdType adType = AppodealAdType.All]) → dynamic -
Disables specified
network
foradType
. -
getPlatformSdkVersion(
) → Future< String> - Gets SDK platform version.
-
getPredictedEcpm(
AppodealAdType adType) → Future< double> -
Gets predicted eCPM for a certain
adType
. -
getSDKVersion(
) → String - Gets SDK version.
-
getUserId(
) → Future< String?> - Gets user Id.
-
hide(
AppodealAdType adType) → dynamic -
Hides
adType
advertising. -
initialize(
{required String appKey, required List< AppodealAdType> adTypes, dynamic onInitializationFinished(List<ApdInitializationError> ? errors)?}) → dynamic - Initialize the Appodeal SDK
-
isAdViewAutoResume(
) → Future< bool> -
Checks if ad view auto resume is enabled for the
Android
platform (default istrue
). -
isAutoCacheEnabled(
AppodealAdType adType) → Future< bool> -
Checks if auto cache is enabled for
adType
. -
isBannerAnimation(
) → Future< bool> -
Checks if banner animation is enabled (
false
by default). -
isChildDirectedTreatment(
) → Future< bool> -
Checks if data collection for kids' apps is disabled (
false
by default). -
isInitialized(
AppodealAdType adType) → Future< bool> -
Checks if
adType
is initialized. -
isLoaded(
AppodealAdType adType) → Future< bool> -
Checks if an ad is loaded for
adType
. -
isMuteVideosIfCallsMuted(
) → Future< bool> -
Checks if muting videos when calls are muted is enabled for
Android
platform (false
by default). -
isPrecache(
AppodealAdType adType) → Future< bool> -
Checks if the loaded ad is a precache for
adType
. -
isSmartBanners(
) → Future< bool> -
Checks if smart banners are enabled (
false
by default). -
isTabletBanners(
) → Future< bool> -
Checks if tablet banners are enabled (
false
by default). -
isTesting(
) → Future< bool> - Check if test mode is enabled
-
isUseSafeArea(
) → Future< bool> -
Checks if using safe area is enabled for
Android
platform (false
by default). -
logEvent(
String eventName, Map< String, dynamic> params) → dynamic -
Logs an event with
eventName
andparams
in all connected services. -
muteVideosIfCallsMuted(
bool isMuteVideosIfCallsMuted) → dynamic -
Mutes video if
isMuteVideosIfCallsMuted
istrue
forAndroid
platform (false
by default). -
setAdRevenueCallbacks(
{dynamic onAdRevenueReceive(AppodealAdRevenue adRevenue)?}) → void - Set ad revenue callbacks.
-
setAdViewAutoResume(
bool isAdViewAutoResume) → dynamic -
Sets
isAdViewAutoResume
for theAndroid
platform (default istrue
). -
setAutoCache(
AppodealAdType adType, bool isAutoCache) → dynamic -
Sets
isAutoCache
for new ads when current ads were shown foradType
. -
setBannerAnimation(
bool isBannerAnimationEnabled) → dynamic -
Sets
isBannerAnimationEnabled
(true
by default). -
setBannerCallbacks(
{dynamic onBannerLoaded(bool isPrecache)?, Function? onBannerFailedToLoad, Function? onBannerShown, Function? onBannerShowFailed, Function? onBannerClicked, Function? onBannerExpired}) → void - Sets Banner ads callbacks.
-
setBannerRotation(
int leftBannerRotation, int rightBannerRotation) → dynamic - Sets banners inverse rotation (by default: left = 90, right = -90).
-
setChildDirectedTreatment(
bool isChildDirectedTreatment) → dynamic - Disables data collection for kids' apps.
-
setCustomFilter(
String name, dynamic value) → dynamic -
Sets custom segment filter
name
tovalue
. -
setExtraData(
String key, dynamic value) → dynamic -
Sets custom extra data
key
tovalue
. -
setInterstitialCallbacks(
{dynamic onInterstitialLoaded(bool isPrecache)?, Function? onInterstitialFailedToLoad, Function? onInterstitialShown, Function? onInterstitialShowFailed, Function? onInterstitialClicked, Function? onInterstitialClosed, Function? onInterstitialExpired}) → void - Sets Interstitial ads callbacks.
-
setLogLevel(
int logLevel) → dynamic -
Set
logLevel
-
setMrecCallbacks(
{dynamic onMrecLoaded(bool isPrecache)?, Function? onMrecFailedToLoad, Function? onMrecShown, Function? onMrecShowFailed, Function? onMrecClicked, Function? onMrecExpired}) → void - Sets MREC ads callbacks.
-
setRewardedVideoCallbacks(
{dynamic onRewardedVideoLoaded(bool isPrecache)?, Function? onRewardedVideoFailedToLoad, Function? onRewardedVideoShown, Function? onRewardedVideoShowFailed, Function? onRewardedVideoClicked, dynamic onRewardedVideoFinished(double amount, String reward)?, dynamic onRewardedVideoClosed(bool isFinished)?, Function? onRewardedVideoExpired}) → void - Sets Rewarded video ads callbacks.
-
setSmartBanners(
bool isSmartBannersEnabled) → dynamic -
Sets
isSmartBannersEnabled
(false
by default). -
setTabletBanners(
bool isTabletBannerEnabled) → dynamic -
Sets
isTabletBannerEnabled
(false
by default). -
setTesting(
bool isTestMode) → dynamic -
setUserId(
String userId) → dynamic -
Sets
userId
. -
setUseSafeArea(
bool isUseSafeArea) → dynamic -
Sets use safe area
isUseSafeArea
forAndroid
platform (false
by default). -
show(
AppodealAdType adType, [String placement = "default"]) → Future< bool> -
Shows
adType
advertising withplacement
. -
validateInAppPurchase(
{required AppodealPurchase purchase, dynamic onInAppPurchaseValidateSuccess(AppodealPurchase purchase, List< ApdValidationError> ? errors)?, dynamic onInAppPurchaseValidateFail(AppodealPurchase purchase, List<ApdValidationError> ? errors)?}) → dynamic -
Validates in-app
purchase
in one of the connected attribution services.
Constants
- BANNER → const AppodealAdType
- Rectangular ads that appear at the top/right/bottom/left or view of the device screen.
- BANNER_BOTTOM → const AppodealAdType
- BANNER_LEFT → const AppodealAdType
- BANNER_RIGHT → const AppodealAdType
- BANNER_TOP → const AppodealAdType
- INTERSTITIAL → const AppodealAdType
- Interstitial ads are full-screen ads that cover the interface of their host app.
- LogLevelDebug → const int
- Log level debug for setLogLevel method.
- LogLevelNone → const int
- Log level none for setLogLevel method.
- LogLevelVerbose → const int
- Log level verbose for setLogLevel method.
- MREC → const AppodealAdType
- Rectangular ads (with defined size 300x250 dp) that appear at the view of the device screen.
- REWARDED_VIDEO → const AppodealAdType
- Ads that reward users for watching short videos and interacting with playable ads and surveys.