getAppInfo method

Future<ApplicationInfo> getAppInfo()

获取应用信息

Implementation

Future<ApplicationInfo> getAppInfo() async {
  var appJsonData = await CloudChannelManager.instance.send<String>(_appInfoKey);
  if (appJsonData.isEmptyJson) {
    return Future.value(ApplicationInfo());
  }
  var map = JsonUtils.fromJson(appJsonData!);
  var applicationInfo = ApplicationInfo.fromJson(map);
  _appInfo = applicationInfo;
  return Future.value(applicationInfo);
}