TPNative class

Constructors

TPNative()

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

callback(TPNativeAdListener listener, String adUnitId, String method, Map arguments) → dynamic
createNativeExtraMap({double templateWidth = 320, double templateHeight = 250, num? loadCount, Map? customMap, Map? localParams, bool openAutoLoadCallback = false, double maxWaitTime = 0}) Map
构建ExtraMap: isAutoLoad 是否开启自动记载 默认开启, customMap 流量分组等自定义数据 templateWidth 原生模版类型预设宽度 ,templateWidth 原生模版类型预设高度
createNativeSubViewAttribute(double width, double height, {double x = 0, double y = 0, String backgroundColorStr = '#FFFFFF', String textColorStr = '#000000', double textSize = 15, bool isCustomClick = true}) Map
自定义模版参数
entryNativeAdScenario(String adUnitId, {String? sceneId}) Future<void>
进入广告场景:adUnitId 广告位ID ,sceneId 从Tradplus后台获取到到场景ID
loadNativeAd(String adUnitId, {Map? extraMap}) Future<void>
加载广告:adUnitId 广告位ID, extraMap = createNativeExtraMap
nativeAdReady(String adUnitId) Future<bool>
广告是否ready:adUnitId 广告位ID
nativeLoadedCount(String adUnitId) Future<int>
获取已缓存广告数量
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setCustomAdInfo(String adUnitId, Map customAdInfo) Future<void>
开发者通过此接口在展示前设置透传信息,透传信息可以在广告展示后的相关回调的adInfo中获取
setNativeAdListener(TPNativeAdListener listener, {String adUnitId = ""}) → dynamic
设置广告Listener:adUnitId 设置后只返回指定广告位相关回调(可选)
toString() String
A string representation of this object.
inherited

Operators

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