DeepAdxRewardVideo class

激励视频广告控制器(无视图,直接全屏展示)。

final ad = DeepAdxRewardVideo(
  placementId: 'xxx',
  userId: 'user_123',
  onReward: () => 发放奖励,
  onFailed: (e) => ...,
);
await ad.loadAndShow();
Inheritance

Constructors

DeepAdxRewardVideo({String? placementId, String? userId, String? rewardName, int? rewardAmount, DeepAdxRewardOrientation? orientation, String? extra, bool mute = true, DeepAdxSucceedCallback? onSucceed, DeepAdxFailedCallback? onFailed, DeepAdxExposureCallback? onExposure, DeepAdxClickedCallback? onClicked, DeepAdxCloseCallback? onClose, DeepAdxSucceedCallback? onVideoCached, DeepAdxVideoCompleteCallback? onVideoComplete, DeepAdxSucceedCallback? onVideoSkip, DeepAdxRewardCallback? onReward, DeepAdxRewardServerInfCallback? onRewardServerInf})

Properties

extra String?
媒体补充信息(服务端透传)
final
extraParams Map<String, Object?>
各广告形态额外 create 参数,由子类覆写。
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
instanceId String
广告实例唯一 ID(由 Dart 侧生成)
finalinherited
mute bool
是否静音播放,默认 true
final
onClicked DeepAdxClickedCallback?
点击回调
finalinherited
onClose DeepAdxClickedCallback?
关闭回调
finalinherited
onExposure DeepAdxClickedCallback?
曝光回调
finalinherited
onFailed DeepAdxFailedCallback
加载失败回调
finalinherited
onReward DeepAdxClickedCallback?
到达激励时间、奖励生效回调
final
onRewardServerInf DeepAdxRewardServerInfCallback?
服务端奖励回调(仅 Android 穿山甲/百度渠道透出)
final
onSucceed DeepAdxSucceedCallback
加载成功回调
finalinherited
onVideoCached DeepAdxClickedCallback?
视频缓存完成回调
final
onVideoComplete DeepAdxClickedCallback?
视频播放完成回调
final
onVideoSkip DeepAdxClickedCallback?
视频跳过回调
final
orientation DeepAdxRewardOrientation?
屏幕方向
final
placementId String?
DeepAdx 广告位 ID(后台广告单元 ID),可为空使用全局默认配置
finalinherited
rewardAmount int?
奖励数量
final
rewardName String?
奖励名称(穿山甲)
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
userId String?
用户 ID(服务端奖励透传)
final

Methods

createWithView() Future<void>
由视图类广告(开屏/横幅/原生)在 PlatformView 创建完成后调用。
inherited
destroy() Future<void>
销毁广告实例,页面退出或不再需要广告时必须调用。
inherited
loadAndShow() Future<void>
加载并展示广告。
inherited
loadOnly() Future<void>
仅加载广告,不展示;成功后通过 onSucceed 通知。
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onEvent(String event, Object? args) → void
子类扩展事件处理(激励/原生等专属事件)。
override
show() Future<void>
展示已加载成功的广告(先调用 loadOnly)。
inherited
toString() String
A string representation of this object.
inherited

Operators

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