loadAd method

dynamic loadAd({
  1. required String posId,
  2. required double adWidth,
  3. required double adHeight,
  4. bool? showClose = false,
})

加载广告

Implementation

loadAd({
  required String posId,
  required double adWidth,
  required double adHeight,
  bool? showClose = false,
}) {
  if (adWidth <= 0 || adHeight <= 0) {
    debugPrint("广告宽度和高度必须大于0!");
    throw ArgumentError("广告宽度和高度必须大于0");
  }
  load(
    posId: posId,
    methodName: BwtAdCore.methodLoadBannerAd,
    arguments: {
      BwtAdCore.keyAdWidth: adWidth,
      BwtAdCore.keyAdHeight: adHeight,
      BwtAdCore.keyAdShowClose: showClose
    },
  );
}