flutter_in_store_app_version_checker 1.7.1
flutter_in_store_app_version_checker: ^1.7.1 copied to clipboard
A lightweight flutter plugin to check if your app is up-to-date on GooglePlay or AppStore.
flutter_in_store_app_version_checker #
Description #
This package is used to check if your app has a new version on playstore or apple app store. Or you can even check what is the latest version of another app on playstore or apple app store.
Installation #
Add InStoreAppVersionChecker to your pubspec:
dependencies:
flutter_in_store_app_version_checker: any # or the latest version on Pub
Example #
Initialize #
final _checker = InStoreAppVersionChecker();
Or
final _checker = InStoreAppVersionChecker(
appId: 'Specify the app id', // Optional
currentVersion: 'Specify the current version', // Optional
);
Usage #
@override
void initState() {
super.initState();
checkVersion();
}
void checkVersion() async {
_checker.checkUpdate().then((value) {
log(value.appURL); // Return the app url
log(value.canUpdate); // Return true if update is available
log(value.currentVersion); // Return current app version
log(value.errorMessage); // Return error message if found else it will return null
log(value.newVersion); // Return the new app version
});
}
Use on Apk Pure Store #
final _checker = InStoreAppVersionChecker(
appId: 'Specify the app id',
androidStore: AndroidStore.apkPure,
);