getPackageInfo static method

dynamic getPackageInfo(
  1. dynamic remoteConfig
)

Implementation

static getPackageInfo(remoteConfig) async {
  await remoteConfig.activate();
  PackageInfo.fromPlatform().then((PackageInfo packageInfo) {
    String currentVersion = packageInfo.version;
    String remotrVersion = remoteConfig.getString("version_name");
    String appDownloadURL = remoteConfig.getString("app_url");
    if (remotrVersion != currentVersion) {
      appForceUpdateDialog(appDownloadURL);
    }
  });
}