loadRewardVideoAd static method

Future<bool> loadRewardVideoAd({
  1. required String androidCodeId,
  2. required String iosCodeId,
  3. bool? supportDeepLink,
  4. required String rewardName,
  5. required int rewardAmount,
  6. required String userID,
  7. int? orientation,
  8. String? mediaExtra,
  9. int? downloadType,
  10. int? adLoadType,
})

激励视频广告预加载 (模版渲染)

androidCodeId android 激励视频广告id 必填

iosCodeId ios 激励视频广告id 必填

supportDeepLink 是否支持 DeepLink 选填

adLoadType用于标注此次的广告请求用途为预加载(当做缓存)还是实时加载,FlutterUnionadLoadType

Implementation

static Future<bool> loadRewardVideoAd({
  required String androidCodeId,
  required String iosCodeId,
  bool? supportDeepLink,
  required String rewardName,
  required int rewardAmount,
  required String userID,
  int? orientation,
  String? mediaExtra,
  int? downloadType,
  int? adLoadType,
}) async {
  return await _channel.invokeMethod("loadRewardVideoAd", {
    "androidCodeId": androidCodeId,
    "iosCodeId": iosCodeId,
    "supportDeepLink": supportDeepLink ?? true,
    "rewardName": rewardName,
    "rewardAmount": rewardAmount,
    "userID": userID,
    "orientation": orientation ?? 0,
    "mediaExtra": mediaExtra ?? "",
    "downloadType":
        downloadType ?? FlutterUnionadDownLoadType.DOWNLOAD_TYPE_POPUP,
    "adLoadType": adLoadType ?? FlutterUnionadLoadType.LOAD,
  });
}