checkUpdate method
Implementation
Future<AppCheckerResult> checkUpdate() async {
PackageInfo packageInfo = await PackageInfo.fromPlatform();
final _currentVersion = currentVersion ?? packageInfo.version;
final _packageName = appId ?? packageInfo.packageName;
if (Platform.isAndroid) {
switch (androidStore) {
case AndroidStore.apkPure:
return await _checkApkPureStore(_currentVersion, _packageName);
default:
return await _checkPlayStore(_currentVersion, _packageName);
}
} else if (Platform.isIOS) {
return await _checkAppleStore(_currentVersion, _packageName);
} else {
return AppCheckerResult(_currentVersion, null, "",
'The target platform "${Platform.operatingSystem}" is not yet supported by this package.');
}
}