cacheEnvData static method

dynamic cacheEnvData(
  1. String userID
)

Implementation

static cacheEnvData(String userID) async {
  final result = await TencentImSDKPlugin.v2TIMManager.getUsersInfo(userIDList: [userID]);
  if (result.code == 0 && result.data != null) {
    TencentCloudChat.instance.dataInstance.basic.updateCurrentUserInfo(userFullInfo: result.data!.first);
  }

  V2TimValueCallback<String> versionRes = await TencentImSDKPlugin.v2TIMManager.getVersion();
  if (versionRes.code == 0) {
    TencentCloudChat.instance.dataInstance.basic.updateVersion(version: versionRes.data ?? "");
  }
}