ContentConfig class

内容 SDK 初始化配置

参数平台支持说明:

  • ✅ 完全支持:在该平台上完全可用
  • ⚠️ 部分支持:在该平台上部分可用或通过其他方式实现
  • ❌ 不支持:该平台SDK暂不支持此配置

Constructors

ContentConfig({bool enableDrama = true, bool enableStory = false, bool enableVideo = false, bool? debugLog, int? imageCacheSize, bool? disableAbTest, bool? isNewUser, int? newUserAliveSeconds, bool? personalizationEnabled, String? userId, String? channel, PrivacyConfig? privacy, Map<String, dynamic>? extra})
const
ContentConfig.fromMap(Map<String, dynamic> map)
从 Map 反序列化配置
factory

Properties

channel String?
媒体自定义渠道标识
final
debugLog bool?
是否开启调试日志(null 表示使用 SDK 默认值)
final
disableAbTest bool?
是否禁用 A/B 实验
final
enableDrama bool
是否接入短剧能力(默认为 true)
final
enableStory bool
是否接入短故事能力(默认为 false)
final
enableVideo bool
是否接入小视频能力(默认为 true)
final
extra Map<String, dynamic>?
额外透传信息(例如自定义配置)
final
hashCode int
The hash code for this object.
no setterinherited
imageCacheSize int?
图片缓存大小(单位 MB)
final
isNewUser bool?
是否判断为新用户(配合 newUserAliveSeconds 使用)
final
newUserAliveSeconds int?
新用户保护时长(单位秒)
final
personalizationEnabled bool?
个性化推荐开关(null 表示沿用 SDK 默认)
final
privacy PrivacyConfig?
隐私合规配置
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
userId String?
登录态关联的用户 ID
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMap() Map<String, dynamic>
转换为 Map,自动过滤掉 null 值
toString() String
A string representation of this object.
override

Operators

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