flutter_in_store_app_version_checker 2.0.0-pre.4 copy "flutter_in_store_app_version_checker: ^2.0.0-pre.4" to clipboard
flutter_in_store_app_version_checker: ^2.0.0-pre.4 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 #

Pub Version popularity likes codecov style: flutter lints

Description #

A lightweight Flutter plugin to check whether your app (or any other app) has a newer version published on Google Play, ApkPure, or Apple App Store.

Add the dependency:

dependencies:
  flutter_in_store_app_version_checker: <current>

Supported platforms #

Platform Stores
Android Google Play, ApkPure
iOS Apple App Store

Other platforms (Web, Windows, Linux, macOS, etc.) are not supported.

Supported Android stores #

Android enum value Description
InStoreAppVersionChecker$AndroidStore.googlePlayStore Default Google Play flow
InStoreAppVersionChecker$AndroidStore.apkPure Alternative ApkPure scrape

API Overview #

Main access point: InStoreAppVersionChecker (singleton: InStoreAppVersionChecker.instance) returning IInStoreAppVersionChecker implemented by InStoreAppVersionChecker.

Request parameters: InStoreAppVersionChecker$Params

Response object: InStoreAppVersionChecker$Response

Key response fields:

  • isSuccess / isError
  • currentVersion
  • newVersion
  • canUpdate
  • appURL
  • errorMessage

Version comparison logic considers:

  • Pre-release tokens (numeric and mixed) after core version comparison.
  • Build metadata (+xyz) is ignored for equality/update decisions.
  • Whitespace trimmed; non-alphanumeric symbols stripped (see tests).
  • Mixed alphanumeric pre-release segments compared token-by-token with numeric-aware ordering.

Example #

Simple check (Play Store HTML with fallback API) #

import 'package:flutter_in_store_app_version_checker/flutter_in_store_app_version_checker.dart';

Future<void> check() async {
  const params = InStoreAppVersionChecker$Params(
    locale: 'en',
    // packageName:    'com.example.app', // optional override
    // currentVersion: '1.2.3',           // optional override
    // androidStore:   InStoreAppVersionChecker$AndroidStore.apkPure,
  );
  final res = await InStoreAppVersionChecker.instance.checkUpdate(params);
  if (res.isSuccess) {
    print('Current version: ${res.currentVersion}');
    print('New version    : ${res.newVersion}');
    print('App url        : ${res.appURL}');
    print('Can update     : ${res.canUpdate}');
  } else {
    print('Error          : ${res.errorMessage}');
  }
}

ApkPure #

const params = InStoreAppVersionChecker$Params(
  locale: 'en',
  androidStore: InStoreAppVersionChecker$AndroidStore.apkPure,
);
final res = await InStoreAppVersionChecker.instance.checkUpdate(params);

iOS #

const params = InStoreAppVersionChecker$Params(locale: 'en');
final res = await InStoreAppVersionChecker.instance.checkUpdate(params);

Custom HTTP client #

final custom = InStoreAppVersionChecker.custom(httpClient: customHTTPClient);
const params = InStoreAppVersionChecker$Params(locale: 'en');
final res = await custom.checkUpdate(params);

Version comparison notes #

  • Release vs pre-release: a pure release is considered higher than a pre-release with the same core; therefore if current is release and new is pre-release -> treated as update (legacy-compatible).
  • Numeric pre-release tokens compared numerically; mixed/alphanumeric tokens compared lexicographically after numeric segments.
  • Trailing zero segment normalization: 1.2 equals 1.2.0 (no update).
  • Fully non-numeric current vs numeric new => update.
  • Fully non-numeric new vs numeric current => no update.
  • Build metadata (+build) ignored. See unit tests in test/unit for authoritative behavior.

Error handling #

Types:

  • success
  • error (network failures, app not found, unsupported platform)

errorMessage is populated only for error responses. An error response may still indicate canUpdate == true if newVersion is greater.

Changelog #

Refer to the Changelog to get all release notes.

Maintainers #

Anton Ustinoff (ziqq)

License #

MIT

Funding #

If you want to support the development of our library, there are several ways you can do it:

Coverage #

13
likes
0
points
3.53k
downloads

Publisher

unverified uploader

Weekly Downloads

A lightweight flutter plugin to check if your app is up-to-date on GooglePlay or AppStore

Repository (GitHub)
View/report issues

Funding

Consider supporting this project:

www.buymeacoffee.com
boosty.to

License

unknown (license)

Dependencies

flutter, http, meta, package_info_plus

More

Packages that depend on flutter_in_store_app_version_checker

Packages that implement flutter_in_store_app_version_checker