FlutterPangleAds class

穿山甲广告插件

Constructors

FlutterPangleAds()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

requestIDFA Future<bool>
请求应用跟踪透明度授权(仅 iOS)
no setter
requestPermissionIfNecessary Future<bool>
动态请求相关权限(仅 Android)
no setter

Static Methods

clearFeedAd(List<int> list) Future<bool>
清除信息流广告列表 list 信息流广告 id 列表
initAd(String appId, {bool useTextureView = false, bool supportMultiProcess = false, bool allowShowNotify = true, List<int> directDownloadNetworkType = const []}) Future<bool>
初始化广告 appId 应用ID useTextureView (Android) 是否使用TextureView控件播放视频 supportMultiProcess (Android) 是否支持多进程 allowShowNotify (Android) 是否允许sdk展示通知栏提示 directDownloadNetworkType 允许直接下载的网络类型,默认是空会有下载确认提示,非空不会有提示
loadFeedAd(String posId, {int width = 375, int height = 0, int count = 1}) Future<List<int>>
加载信息流广告列表 posId 广告位 id width 宽度 height 高度 count 获取广告数量,建议 1~3 个
onEventListener(OnAdEventListener onAdEventListener) Future<void>
事件回调 @params onData 事件回调
setUserExtData({required String personalAdsType}) → dynamic
设置个性化推荐 @params personalAdsType,不传或传空或传非01值没任何影响,默认不屏蔽, 0屏蔽个性化推荐广告, 1不屏蔽个性化推荐广告
showFullScreenVideoAd(String posId) Future<bool>
展示全屏视频、新插屏广告 posId 广告位 id
showRewardVideoAd(String posId, {String? customData, String? userId}) Future<bool>
展示激励视频广告 posId 广告位 id customData 设置服务端验证的自定义信息 userId 设置服务端验证的用户信息
showSplashAd(String posId, {double timeout = 3.5}) Future<bool>
展示开屏广告 posId 广告位 id logo 如果传值则展示底部logo,不传不展示,则全屏展示 timeout 加载超时时间