XandrPlatform class abstract
The interface that implementations of xandr must implement.
Platform implementations should extend this class
rather than implement it as Xandr.
Extending this class (using extends) ensures that the subclass will get
the default implementation, while platform implementations that implements
this interface will be broken by newly added XandrPlatform methods.
- Inheritance
-
- Object
- PlatformInterface
- XandrPlatform
Constructors
- XandrPlatform()
- Constructs a XandrPlatform.
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
-
disposeMultiAdRequest(
String multiAdRequestID) → Future< void> -
Disposes a multi ad request with the specified
multiAdRequestID. -
getPublisherUserId(
) → Future< String> - Returns the publisher user ID.
-
getUserIds(
) → Future< List< UserId> > - Returns a list of UserId objects.
-
init(
int memberId, {int? publisherId, bool testMode = false}) → Future< bool> - Return the current platform name.
-
initMultiAdRequest(
) → Future< String> - Initializes a multi ad request.
-
loadAd(
int widgetId) → Future< bool> - loads an ad.
-
loadAdsForMultiAdRequest(
String multiAdRequestID) → Future< bool> -
Loads ads for a multi ad request with the specified
multiAdRequestID. Returns a Future that completes with a bool indicating whether the ads were successfully loaded. -
loadInterstitialAd(
String? placementID, String? inventoryCode, CustomKeywords? customKeywords) → Future< bool> - loads an interstitial ad.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerEventStream(
{required StreamController< BannerAdEvent> controller}) → void - Registers the event stream.
-
resetController(
) → Future< void> - Resets XandrController instance
-
setAutoRefreshInterval(
int autoRefreshIntervalInSeconds, String? inventoryCode, String? placementID) → Future< bool> - Sets the autoRefreshInterval value of a banner view
-
setGDPRConsentRequired(
bool isConsentRequired) → Future< void> - Sets whether GDPR consent is required.
-
setGDPRConsentString(
String consentString) → Future< void> - Sets the GDPR consent string.
-
setGDPRPurposeConsents(
String purposeConsents) → Future< void> - Sets the GDPR purpose consents.
-
setPublisherUserId(
String publisherUserId) → Future< void> - Sets the publisher user ID.
-
setUserIds(
List< UserId> userIds) → Future<void> - Sets the user IDs for the current user.
-
showInterstitialAd(
Duration? autoDismissDelay) → Future< bool> - Return the current platform name.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance ↔ XandrPlatform
-
The default instance of XandrPlatform to use.
getter/setter pair