Nnsdk class

NN SDK 主入口类,提供初始化、支付、归因、埋点等功能

对外只暴露统一 API,内部通过多个 Manager 进行职责拆分。

Properties

activityChannel String
归因渠道 ID
no setter
attributionEntity AttributionEntity?
当前归因信息
no setter
bridgingEntity BridgingEntity?
原生与 Flutter 之间的桥接配置实体
getter/setter pair
deviceId String
设备 ID(为空时返回空字符串)
no setter
deviceInfo DeviceInfoEntity?
当前设备信息
no setter
digitalUnionId String?
数盟 ID(cdid)
no setter
digitaPhoneId String?
no setter
encryptedHeader bool
请求头是否加密
no setter
hashCode int
The hash code for this object.
no setterinherited
host String
接口请求域名
no setter
isDebug bool
是否开启调试模式
no setter
isLog bool
是否开启日志打印
no setter
isNature bool
是否自然量渠道
no setter
isNewUser bool
是否新用户(根据创建时间与当前时间是否为同一天判断)
no setter
networkStatus String
当前网络类型
no setter
phoneId String?
设备 IDFA(原生上报)
no setter
prdId String
产品 ID
no setter
productList List<CommodityItemEntity>
当前商品列表
no setter
realPhoneId String
实际使用的 IDFA
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
userId int
中台用户 ID
no setter
userLoginEntity UserLoginEntity?
当前已登录的用户信息
no setter

Methods

createOrder({required String commodityId, String? transferParameter, String? userIdentifier}) Future<PayResultEntity>
下单并发起支付
finishUnVerifyOrders(bool isDiscard, String? userIdentifier) Future<bool>
处理未完成的订单
getDeviceId() Future<String>
获取设备ID
initGDT() Future<void>
初始化广点通(GDT)归因能力
initSdk({required ConfigEntity config, required BridgingEntity bridging}) Future<InitResultEntity>
初始化 SDK
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
restore(String? userIdentifier) Future<RestoreResultEntity>
恢复购买
toString() String
A string representation of this object.
inherited
track({required String eventName, Map<String, dynamic>? params = const {}}) Future<void>
上报埋点事件
updatePhoneId(String id) → void
更新设备 IDFA(由原生回调时调用)

Operators

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

Static Properties

instance Nnsdk
获取全局单例实例
no setter