パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v7.0.0

app_version_update

ローカルアプリが、それぞれのストア(Play Store / Apple Store)と同じバージョンに更新されているかどうかを確認する簡単で迅速な方法です。

AndroidiOSmacOSWindowsLinux
30日間ダウンロード
1.3万
いいね数
160
Pub ポイント
145

パッケージをインストール

flutter pub add app_version_update

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

app_version_update パッケージは、インストールされたアプリのバージョンが、それぞれのアプリストア(Google Play ストアまたはApple App Store)で利用可能な最新バージョンと一致しているかどうかを確認するプロセスを簡素化します。開発者がサードパーティサービスに頼らずにプログラム的にアップデートを検証できるようにします。このパッケージは、Android、iOS、macOS、Windows、Linuxなど複数のプラットフォームをサポートしており、クロスプラットフォームアプリに最適です。ローカルバージョンコードとストアバージョンを比較することで、必要に応じてユーザーに更新を促すことができます。

用途

  • 起動時にアプリの更新を確認する
  • アプリ内ダイアログを使用してユーザーに更新を促す
  • 複数プラットフォーム間のバージョンの一貫性を確認する
  • バックグラウンドで更新チェックを自動化する
  • マルチプラットフォームアプリをサポート

主な機能

  • クロスプラットフォーム互換性
  • バージョン比較のためのシンプルな API
  • Google Play および Apple App Store との統合
  • 軽量で依存関係なし
  • リアルタイムバージョン検証

適している対象

  • クロスプラットフォーム対応のFlutterアプリ
  • 自動更新のプロンプトを必要とするアプリ
  • 最小限のセットアップを求める開発者
  • Android および iOS をターゲットとしたプロジェクト
  • バージョン同期検証が必要なアプリ

注意事項

  • ストアクエリにはインターネット接続が必要です
  • Play StoreおよびApp Storeに限定
  • 代替的なアプリ配布のサポートなし
  • バージョンコードの形式はストアの期待に一致している必要があります
  • 頻繁なチェックではレート制限の処理が必要になる場合があります

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

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.

カテゴリー

依存関係

依存関係一覧 4 件

ソースリポジトリ

このパッケージを使用しているプロジェクト