搜索插件、代码仓与 APP 分类

GitHub 代码仓kauemurakami/app_version_update

app_version_update

[Flutter 包] 一种简单快捷的方法,用于检查本地应用是否已在各自的应用商店(Google Play 商店 / Apple App Store)中更新到相同版本。

app_version_update 项目封面
星标
34
复刻
32
最近推送(UTC)
2026年6月2日
项目状态
未归档

原始 README

以下为英文项目原文快照,最新内容请访问 GitHub。

Star on GitHub

Retrieve version and url for local app update against store app Android and iOS

Features

Using as reference packages like in_app_update , version_check.

Compares local version with the respective store version for the purpose of detecting user-side version updates.

It also provides widgets like dialog , bottom sheets and pages for you to display the update option to the user.

Getting started

$ flutter pub add app_version_update

or add in your dependencies

dependencies:
  app_version_update: <latest>

to use this app you need to have the app hosted in stores.

To test, you can manually downgrade your pubspec.yaml from your version: , when you run your local version it will be different from the store version

Usage

Internet permission Android: <uses-permission android:name="android.permission.INTERNET" />

Internet permission iOs:

<key>NSAppTransportSecurity</key>  
<dict>  
  <key>NSAllowsArbitraryLoads</key><true/>  
</dict>  
final appleId = '284882215'; // If this value is null, its packagename will be considered
final playStoreId = 'com.facebook.katana'; // If this value is null, its packagename will be considered

await AppVersionUpdate.checkForUpdates(
            appleId: appleId, playStoreId: playStoreId)
        .then((data) async {
            print(data.storeUrl);
            print(data.storeVersion);
            if(data.canUpdate!){
              //showDialog(... your custom widgets view) 
              //or use our widgets
              // AppVersionUpdate.showAlertUpdate
              // AppVersionUpdate.showBottomSheetUpdate
              // AppVersionUpdate.showPageUpdate
              AppVersionUpdate.showAlertUpdate(
              appVersionResult: data, context: context);
            }
         });

Customize the Alert Dialog

// you also have some options to customize our Alert Dialog 
AppUpdateVersion.showAlertUpdate(
    {BuildContext? context,
      AppVersionResult? appVersionResult,
      bool? mandatory = false,
      String? title = 'New version available',
      TextStyle titleTextStyle =
          const TextStyle(fontSize: 24.0, fontWeight: FontWeight.w500),
      String? content = 'Would you like to update your application?',
      TextStyle contentTextStyle =
          const TextStyle(fontSize: 16.0, fontWeight: FontWeight.w400),
      ButtonStyle? cancelButtonStyle = const ButtonStyle(
          backgroundColor: MaterialStatePropertyAll(Colors.redAccent)),
      ButtonStyle? updateButtonStyle = const ButtonStyle(
          backgroundColor: MaterialStatePropertyAll(Colors.green)),
      String? cancelButtonText = 'UPDATE LATER',
      String? updateButtonText = 'UPDATE',
      TextStyle? cancelTextStyle = const TextStyle(color: Colors.white),
      TextStyle? updateTextStyle = const TextStyle(color: Colors.white),
      Color? backgroundColor = Colors.white})

Customize the our bottom sheet

AppUpdateVersion.showBottomSheetUpdate(
      {@required BuildContext? context,
      @required AppVersionResult? appVersionResult,
      bool? mandatory = false,
      String? title = 'New version avaible',
      Widget? content}) async {
    await showModalBottomSheet(
        isDismissible: !mandatory!,
        context: context!,
        builder: (context) => BottomSheetUpdateVersion(
              appVersionResult: appVersionResult,
              mandatory: mandatory,
              content: content,
              title: title,
            ));
  }

Customize the Page

// you also have some options to customize our Page
AppUpdateVersion.showPageUpdate(
    {@required BuildContext? context,
    @required AppVersionResult? appVersionResult,
    bool? mandatory = false,
    Widget? page}) async {
     Navigator.push(
        context!,
        MaterialPageRoute(
            builder: (context) =>
                page ??
                UpdateVersionPage(
                  mandatory: mandatory,
                  appVersionResult: appVersionResult,
                )));
  }
  
 

Additional information

Next Updates status
Mandatory or optional update released
Create TestMode development
Bottom sheet widget released
Page widget released
Handle Exceptions development
New options custom widgets released
Automatic country detection released
Modularize files listed

This project is at an initial level, more functions will be included as

So any suggestion and contribution is welcome.

Kauê Murakami GitHub avatar
GitHub 作者

Kauê Murakami ↗

Se você consegue imaginar, nós podemos fazer.

Flutter Developer | Mobile DeveloperBrasil官方网站 ↗
语言DartRubySwiftKotlinObjective-C

分类

此仓库发布的插件

使用的依赖

依赖清单 7 项

如何选择适合项目的代码仓?

先按使用场景筛选,再比较项目活跃情况,最后到原始仓库核对使用要求。

  1. 通过仓库名、作者或描述搜索,再按技术分类缩小范围。
  2. 结合星标、复刻与最近推送比较项目;星标反映社区关注,不代表质量保证。
  3. 使用前在 GitHub 核对 README、许可证与 Issues。

来源与维护

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗