loadAd static method

void loadAd(
  1. String placementId
)

Load Ad by a placementId

After you registered your apps on the vungle dashboard, you will get a default placement with an id for each app. You could create more placements as you want. And You need call this method to load the ads for the placement. You could use onAdPlayableListener to know when the ad loaded.

if(Platform.isAndroid) {
  Vungle.loadAd('<Your-Android-placementId>')
} else if(Platform.isIOS) {
  Vungle.loadAd('<Your-IOS-placementId>')
}

Vungle.onAdPlayableListener = (playable, placementId) {
  if(playable) {
    //the ad is loaded, could play ad for now.
  }
}

Implementation

static void loadAd(String placementId) {
  _channel.invokeMethod('loadAd', <String, dynamic>{
    'placementId': placementId,
  });
}