checkUpdate method

Future<AppCheckerResult> checkUpdate()

Implementation

Future<AppCheckerResult> checkUpdate() async {
  final packageInfo = await PackageInfo.fromPlatform();
  final currentVersion = packageInfo.version;
  final packageName = packageInfo.packageName;
  if (Platform.isAndroid) {
    return _checkPlayStore(currentVersion, packageName);
  } else {
    return AppCheckerResult(
      currentVersion,
      null,
      "",
      'The target platform "${Platform.operatingSystem}" is not yet supported by this package.',
    );
  }
}