AdModel class

Model - 广告信息

Constructors

AdModel({required String id, required String adImg, required String adImgHd, String? adName, String? adType, String? adLink, int? belongModule, int? duration})
AdModel.fromCustomJson(Map<String, dynamic> json)
业务方自定义广告
AdModel.fromJson(Map<String, dynamic> json)

Properties

adImg String
广告图(1080*1920)屏幕长高比例小于1:2时使用
getter/setter pair
adImgHd String
广告图(1125*2436)屏幕长高比例大于等于1:2时使用
getter/setter pair
跳转地址
getter/setter pair
adName String?
广告名称
getter/setter pair
adType String?
跳转类型 1-0 站内 2-0 站外 3-0 内部页面-直播间 3-1 内部页面-游戏 3-2 内部页面-直播间游戏
getter/setter pair
belongModule int?
广告归属模块:1启动页,2首页banner,3我的,4跑马灯,5推广页面
getter/setter pair
customKey String
getter/setter pair
customValue String
getter/setter pair
duration int?
广告时长
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
id String
广告ID
getter/setter pair
isCustomAd bool
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getCustomAdType() int
getCustomLocation() int
getDurationSec() int
获取广告时长(最少3秒)
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
override

Operators

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

Static Methods

customLocationToModule(int location) int
业务方sdk传入的自定义广告显示位置转换
moduleToCustomLocation(int? module) int
业务方sdk传入的自定义广告显示位置还原