SensorsABTest class

Constructors

SensorsABTest()

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 Methods

fastFetchABTest<T>(String paramName, T defaultValue, [int timeoutMillSeconds = TIMEOUT_REQUEST]) Future<T?>
如果本地有缓存,则返回缓存数据;否则从网络请求最新的试验数据,默认 30s 超时时间。paramName 是参数名称,defaultValue 是对应参数的默认值, 泛型 T 的支持类型包括:intStringbool 和代表 JSON 的 Map<String,dynamic> 类型, timeoutMillSeconds 的值默认是 30 * 1000,单位是 ms。
fetchABTest<T>(String paramName, T defaultValue, [int timeoutMillSeconds = TIMEOUT_REQUEST]) Future<T?>
始终从网络请求试验结果,默认 30s 超时时间。paramName 是参数名称,defaultValue 是对应参数的默认值, 泛型 T 的支持类型包括:intStringbool 和代表 JSON 的 Map<String,dynamic> 类型, timeoutMillSeconds 的值默认是 30 * 1000,单位是 ms。
fetchCacheABTest<T>(String paramName, T defaultValue) Future<T?>
从缓存中获取试验结果。paramName 是参数名称,defaultValue 是对应参数的默认值, 泛型 T 的支持类型包括:intStringbool 和代表 JSON 的 Map<String,dynamic> 类型。
startWithConfigOptions(String url) → void
初始化 A/B Testing,在此之前请确保先初始化神策分析 SDK: Android 参考文档iOS 参考文档url 为服务器地址

Constants

TIMEOUT_REQUEST → const int