version_checker 0.0.3
version_checker: ^0.0.3 copied to clipboard
A complete way to check if local app has available updates in respective stores (AppStore, AppGallery and PlayStore).
Overview #
Original repository: https://pub.dev/packages/new_version_plus
This package allow to check available updates in respective stores, so it supports AppStore, PlayStore and AppGallery
The main difference between this and original package is that original does not support AppGallery version checking
Getting started #
What Version Checker do #
A Flutter plugin that makes it possible to:
- Check if a user has the most recent version of your app installed.
Installation #
Add version_checker as a dependency in your pubspec.yaml
file.
dependencies:
version_checker: ^0.0.1
Usage #
In main.dart
(or wherever your app is initialized), create an instance of VersionChecker
.
final versionChecker = VersionChecker();
The plugin will automatically use your Flutter package identifier to check the app store. If your app has a different identifier in the Google Play Store or Apple App Store, you can overwrite this by providing values for androidId
and/or iOSId
. If you need to check AppGallery, you must set checkAppGallery
to true
and provide appGalleryId
, appGalleryClientId
and appGalleryClientSecret
:
VersionChecker versionChecker = VersionChecker(
checkAppGallery: true
appGalleryId: "<your app ID>",
appGalleryClientId: "<yout app gallery client ID>",
appGalleryClientSecret:
"<yout app gallery client secret ID>",
);
VersionStatus status = await versionChecker.getVersionStatus();
print(value!.localVersion);
print(value!.storeVersion);
print(value!.canUpdate);
print(value!.storeLink);
For iOS: If your app is only available outside the U.S. App Store, you will need to set iOSAppStoreCountry
to the two-letter country code of the store you want to search. See http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 for a list of ISO Country Codes.