MethodChannelFlutterPangleAds class
基于方法通道的实现
- Inheritance
-
- Object
- PlatformInterface
- FlutterPangleAdsPlatform
- MethodChannelFlutterPangleAds
Constructors
Properties
- eventChannel → EventChannel
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- methodChannel → MethodChannel
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
clearFeedAd(
List< int> list) → Future<bool> -
清除信息流广告列表
list
信息流广告 id 列表override -
initAd(
String appId, {bool useTextureView = false, bool supportMultiProcess = false, bool allowShowNotify = true, List< int> directDownloadNetworkType = const []}) → Future<bool> -
初始化广告
appId
应用IDuseTextureView
(Android) 是否使用TextureView控件播放视频supportMultiProcess
(Android) 是否支持多进程allowShowNotify
(Android) 是否允许sdk展示通知栏提示directDownloadNetworkType
允许直接下载的网络类型,默认是空会有下载确认提示,非空不会有提示override -
loadFeedAd(
String posId, {int width = 375, int height = 0, int count = 1}) → Future< List< int> > -
加载信息流广告列表
posId
广告位 idwidth
宽度height
高度count
获取广告数量,建议 1~3 个override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onEventListener(
OnAdEventListener onAdEventListener) → Future< void> -
事件回调
override
-
requestIDFA(
) → Future< bool> -
请求应用跟踪透明度授权(仅 iOS)
override
-
requestPermissionIfNecessary(
) → Future< bool> -
动态请求相关权限(仅 Android)
override
-
setUserExtData(
{required String personalAdsType}) → Future< void> -
设置个性化推荐
@params personalAdsType,不传或传空或传非01值没任何影响,默认不屏蔽, 0屏蔽个性化推荐广告, 1不屏蔽个性化推荐广告
override
-
showFullScreenVideoAd(
String posId) → Future< bool> -
展示全屏视频、新插屏广告
posId
广告位 idoverride -
showRewardVideoAd(
String posId, {String? customData, String? userId}) → Future< bool> -
展示激励视频广告
posId
广告位 idcustomData
设置服务端验证的自定义信息userId
设置服务端验证的用户信息override -
showSplashAd(
String posId, {String? logo, double timeout = 3.5}) → Future< bool> -
展示开屏广告
posId
广告位 idlogo
如果传值则展示底部logo,不传不展示,则全屏展示timeout
加载超时时间override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited