CloudX class

The main CloudX Flutter SDK class.

Provides a comprehensive Flutter wrapper for the CloudX Core Objective-C SDK.

Constructors

CloudX()

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

clearAllKeyValues() Future<void>
Clear all user and app-level key-value pairs
createBanner({required String placementName, String? adId, CloudXAdViewListener? listener, AdViewPosition? position}) Future<String?>
Create a banner ad
createInterstitial({required String placementName, String? adId, CloudXInterstitialListener? listener}) Future<String?>
Create an interstitial ad
createMREC({required String placementName, String? adId, CloudXAdViewListener? listener, AdViewPosition? position}) Future<String?>
Create an MREC (Medium Rectangle) ad
deinitialize() Future<void>
Deinitialize the CloudX SDK
destroyAd({required String adId}) Future<bool>
Destroy an ad instance and free resources
getGPPSid() Future<List<int>?>
Get GPP section IDs
getGPPString() Future<String?>
Get GPP consent string
getVersion() Future<String>
Get the SDK version
hideBanner({required String adId}) Future<bool>
Hide a banner ad temporarily without destroying it
initialize({required String appKey, bool testMode = false}) Future<bool>
Initialize the CloudX SDK
isInterstitialReady({required String adId}) Future<bool>
Check if interstitial ad is ready to show
isMRECReady({required String adId}) Future<bool>
Check if MREC ad is ready to show
isPlatformSupported() bool
Check if the current platform is supported by CloudX SDK
loadBanner({required String adId}) Future<bool>
Load a banner ad
loadInterstitial({required String adId}) Future<bool>
Load an interstitial ad
loadMREC({required String adId}) Future<bool>
Load an MREC ad
registerWith() → void
Flutter plugin registration (required for some plugin registration scenarios)
setAppKeyValue(String key, String value) Future<void>
Set app-level key-value pair for targeting
setCCPAPrivacyString(String? ccpaString) Future<void>
Set CCPA privacy string (e.g., "1YNN")
setEnvironment(String environment) Future<void>
Set the environment (dev, staging, production) Must be called BEFORE initialize()
setGPPSid(List<int>? sectionIds) Future<void>
Set GPP section IDs
setGPPString(String? gppString) Future<void>
Set GPP (Global Privacy Platform) consent string
setIsAgeRestrictedUser(bool isAgeRestricted) Future<void>
Set whether user is age-restricted (COPPA)
setIsUserConsent(bool hasConsent) Future<void>
Set whether user has given consent (GDPR)
setLoggingEnabled(bool enabled) Future<void>
Enable or disable SDK logging
setUserID(String? userID) Future<void>
Set the user ID
setUserKeyValue(String key, String value) Future<void>
Set user-level key-value pair for targeting
showBanner({required String adId}) Future<bool>
Show a banner ad
showInterstitial({required String adId}) Future<bool>
Show an interstitial ad
showMREC({required String adId}) Future<bool>
Show an MREC ad
startAutoRefresh({required String adId}) Future<bool>
Start auto-refresh for banner or MREC ad
stopAutoRefresh({required String adId}) Future<bool>
Stop auto-refresh for banner or MREC ad