init static method
Implementation
static Future<void> init() async {
var config = LogProducerConfig();
config.endpoint = "ap-nanjing.cls.tencentcs.com";
config.topicId = "819d8ac2-b5fe-4776-9af4-42f8da477c08";
config.secretId = "AKIDjXIwSr7DAyd9WkqonfNuxofU6UhhMwNf";
config.secretKey = "CByYuU0KRL5f3EI9nERREt275wfGk4GJ";
_logProducer = LogProducer(config);
_logProducer?.setLogCallback(logCallback);
BaseDeviceInfo deviceInfo = await deviceInfoPlugin.deviceInfo;
final packageName = await PackageInfo.fromPlatform();
_packageName = packageName.packageName;
// reportConfig = await getReportConfig();
_reportSessionId = DateTime.now().millisecondsSinceEpoch.toString();
_reportLifeId = DateTime.now().millisecondsSinceEpoch.toString();
_reportGlobalRandom = DateTime.now().millisecondsSinceEpoch.toString();
_devSysVersion = deviceInfo.data['systemVersion'] ?? "";
_systemName = deviceInfo.data['systemName'] ?? "";
_model = deviceInfo.data['model'] ?? "";
_deviceId = deviceInfo.data['identifierForVendor'] ?? "";
_physicalRamSize = deviceInfo.data['physicalMemory'] ?? 0;
_availableRamSize = deviceInfo.data['availableMemory'] ?? 0;
_name = deviceInfo.data['name'] ?? "";
TCICController.instance.getEventBus().on<MainEvent>(mainEventChangeListener);
// 获取当前dart包的版本(从版本常量文件读取)
_dartPackageVersion = TCICClientUIVersion.version;
TCICLog.info("deviceInfo: ${jsonEncode(deviceInfo.data)}", actionModule: "report", actionName: "init");
}