CloudX class

The main CloudX Flutter SDK class.

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() → void
Clears all user and app-level key-value pairs.
createBanner({required String adUnitId, required CloudXAdViewPosition position}) → void
Creates a banner at the specified position for the given adUnitId.
createMREC({required String adUnitId, required CloudXAdViewPosition position}) → void
Creates an MREC at the specified position for the given adUnitId.
destroyBanner({required String adUnitId}) → void
Cleans up system resources allocated for the banner.
destroyInterstitial({required String adUnitId}) → void
Cleans up system resources allocated for the interstitial.
destroyMREC({required String adUnitId}) → void
Cleans up system resources allocated for the MREC.
destroyRewardedAd({required String adUnitId}) → void
Cleans up system resources allocated for the rewarded ad.
getVersion() Future<String>
Returns the native SDK version.
hideBanner({required String adUnitId}) → void
Hides the banner without destroying it.
hideMREC({required String adUnitId}) → void
Hides the MREC without destroying it.
initialize({required String appKey}) Future<CloudXConfiguration?>
Initializes the SDK with the provided appKey.
isInitialized() Future<bool>
Whether the SDK has been initialized.
isInterstitialReady({required String adUnitId}) Future<bool>
Check if the ad is ready to be shown.
isRewardedAdReady({required String adUnitId}) Future<bool>
Check if the ad is ready to be shown.
loadBanner({required String adUnitId}) → void
Loads a new banner ad.
loadInterstitial({required String adUnitId}) → void
Loads an interstitial ad for the given adUnitId.
loadMREC({required String adUnitId}) → void
Loads a new MREC ad.
loadRewardedAd({required String adUnitId}) → void
Loads a rewarded ad for the given adUnitId.
setAppKeyValue(String key, String value) → void
Sets an app-level key-value pair for targeting.
setBannerCustomData({required String adUnitId, required String? customData}) → void
Sets custom data for tracking on the banner.
setBannerListener(CloudXAdViewListener? listener) → void
Sets a CloudXAdViewListener to receive banner ad events.
setBannerPlacement({required String adUnitId, required String? placement}) → void
Sets a placement identifier for tracking on the banner.
setDoNotSell(bool? doNotSell) → void
Sets the user's CCPA do-not-sell status manually, bypassing CMP frameworks.
setHashedUserId(String? hashedUserId) → void
Sets the hashed user ID for targeting.
setHasUserConsent(bool? hasUserConsent) → void
Sets the user's GDPR consent status manually, bypassing CMP frameworks.
setInterstitialListener(CloudXInterstitialListener? listener) → void
Sets a CloudXInterstitialListener to receive interstitial ad events.
setMinLogLevel(CloudXLogLevel logLevel) → void
Sets the minimum log level for the SDK. Messages at this level and above will be logged. Use CloudXLogLevel.verbose to enable all logs, or CloudXLogLevel.none to disable logging. Call before initialize for full visibility into the initialization process.
setMRECCustomData({required String adUnitId, required String? customData}) → void
Sets custom data for tracking on the MREC.
setMRecListener(CloudXAdViewListener? listener) → void
Sets a CloudXAdViewListener to receive MREC ad events.
setMRECPlacement({required String adUnitId, required String? placement}) → void
Sets a placement identifier for tracking on the MREC.
setRewardedAdListener(CloudXRewardedListener? listener) → void
Sets a CloudXRewardedListener to receive rewarded ad events.
setUserKeyValue(String key, String value) → void
Sets a user-level key-value pair for targeting.
setVisualDebuggingEnabled(bool enabled) → void
Enables or disables the visual debugging overlay (iOS only). When enabled, a floating debug button appears on screen allowing you to inspect ad loading, mediation, and creative details.
showBanner({required String adUnitId}) → void
Shows the banner. If not yet created, queues the request.
showInterstitial({required String adUnitId, String? placement, String? customData}) → void
Shows the interstitial ad.
showMREC({required String adUnitId}) → void
Shows the MREC. If not yet created, queues the request.
showRewardedAd({required String adUnitId, String? placement, String? customData}) → void
Shows the rewarded ad.
startBannerAutoRefresh({required String adUnitId}) → void
Starts or resumes auto-refresh for the banner.
startMRECAutoRefresh({required String adUnitId}) → void
Starts or resumes auto-refresh for the MREC.
stopBannerAutoRefresh({required String adUnitId}) → void
Pauses auto-refresh for the banner.
stopMRECAutoRefresh({required String adUnitId}) → void
Pauses auto-refresh for the MREC.
updateBannerPosition({required String adUnitId, required CloudXAdViewPosition position}) → void
Updates the banner position for the specified adUnitId.
updateMRECPosition({required String adUnitId, required CloudXAdViewPosition position}) → void
Updates the MREC position for the specified adUnitId.