HighfivveAdManager class

A singleton manager for handling Highfivve advertising SDK operations.

Use HighfivveAdManager.instance to access the shared instance. Provides methods to initialize the SDK, load and show ads, and listen to ad events.

Example usage:

await HighfivveAdManager.instance.initialize(
  bundleName: 'com.example.app',
  publisherCode: 'your-publisher-code',
);
HighfivveAdManager.instance.loadBannerAd();
HighfivveAdManager.instance.adEvent.listen((event) {
  // Handle ad events
});

Properties

adEvent → Stream<AdEvent>
Stream of AdEvents emitted by the SDK.
no setter
adEventListener → _AdEventListener
no setter
adEventSubject → BehaviorSubject<AdEvent>
no setter
bannerSizeChanged → Stream<AdSlotSize>
Stream of banner size updates reported by the native SDK, keyed by AdSlotSize.position.
no setter
eventHistory → List<AdEventRecord>
A chronological log (newest first) of every AdEvent observed so far this session, bounded to the last 50. Unlike adEvent (a live stream a new listener only sees future events on), this reflects everything that happened before you looked too - e.g. HighfivveDebugAuditView reads this so opening the audit screen after an ad already loaded/was clicked still shows that activity, instead of only events that happen to fire while the screen is open.
no setter
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

getAvailableAdSlots() → Future<List<AdSlot>>
Returns a list of available ad slots configured in the SDK.
getDebugSnapshot() → Future<DebugSnapshot>
Returns a snapshot of the SDK's current diagnostic state.
initialize({required String bundleName, required String publisherCode}) → Future<void>
Initializes the Highfivve advertising SDK.
loadInterstitialAd(String position, {String? pageType}) → Future<void>
Loads an interstitial ad for a given position.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
openAdInspector() → Future<void>
Opens Google's native Ad Inspector UI, a full on-device viewer for real ad requests/responses and the mediation waterfall.
setAuditModeEnabled(bool enabled) → Future<void>
Turns the SDK's audit/debug mode on or off.
setInterstitialAutoReloadEnabled(bool enabled) → Future<void>
Enables or disables automatically preloading the next interstitial ad after the current one is dismissed. Enabled by default.
setInterstitialReloadDelay(Duration delay) → Future<void>
Sets the delay before the next interstitial ad is preloaded after dismissal. Defaults to Duration.zero (reload immediately). Has no effect when auto-reload is disabled via setInterstitialAutoReloadEnabled.
setTestDeviceIds(List<String> testDeviceIds) → Future<void>
Registers this device's Google Mobile Ads test-device ID(s), so it serves test ads and can open Ad Inspector.
showInterstitialAd() → Future<void>
Shows a loaded interstitial ad.
toString() → String
A string representation of this object.
inherited
updateConsent(ConsentInfo consent) → Future<void>
Updates the SDK's consent state.

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Properties

instance → HighfivveAdManager
Returns the shared singleton instance.
no setter