VccAdControl class
Controls a single ad placement identified by tag.
Create one instance per screen or ad placement, call addAdId for each ad slot, then requestAds to trigger the native request. Dispose with dispose when the owning widget is removed.
final control = VccAdControl(tag: 'home');
control.addAdId('12345', (tag, requestId, adId) { ... });
control.requestAds('req_001');
// later:
control.dispose();
Constructors
- VccAdControl({required String tag})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
initialized
↔ Future<
void> -
latefinal
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- tag → String
-
final
Methods
-
addAdId(
String adId, AdCallback callback) → void -
Registers
adIdto watch for ad-ready events. -
dispose(
) → void - Cancels the event-channel subscription. Call in State.dispose.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
requestAds(
String requestId) → void - Sends an ad request to the native SDK for all registered ad IDs.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited