toJson method
转为 Map
Implementation
Map<String, dynamic> toJson() {
return {
AMPSControllerKey.isCanUsePhoneState: isCanUsePhoneState,
AMPSControllerKey.oaid: oaid,
AMPSControllerKey.isSupportPersonalized: isSupportPersonalized,
AMPSControllerKey.getUnderageTag: getUnderageTag.value, // 枚举用名称传递
AMPSControllerKey.userAgent: userAgent,
AMPSControllerKey.isCanUseSensor: isCanUseSensor,
AMPSControllerKey.isLocationEnabled: isLocationEnabled,
AMPSControllerKey.location: location?.toJson(), // 嵌套对象序列化
};
}