搜尋套件、儲存庫與 APP 分類

new_version_plus 封面
套件詳情v1.0.1

new_version_plus

檢查您的使用者是否擁有您 Flutter 應用程式最新的版本。

AndroidiOSmacOSWindowsLinux
近 30 天下載
4.7萬
喜歡數
195
Pub 分數
140

安裝套件

flutter pub add new_version_plus

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

new_version_plus 套件幫助 Flutter 應用程式透過檢查應用商店或 Google Play 的元資料來判斷使用者是否正在執行最新版本。它支援多個平台,包括 Android、iOS、macOS、Windows 和 Linux,非常適合跨裝置管理應用程式更新。該套件會從官方商店取得版本資訊,並在有更新可用時通知使用者,進而提升使用者留存率,並確保使用者能存取最新的功能與安全修補。

適用情境

  • 提示使用者在有新版本可用時進行更新
  • 在應用啟動時檢查更新
  • 與應用內更新對話框整合
  • 監控企業應用的版本合規性
  • 支援跨平台更新檢查

主要特色

  • 跨平台支援(Android、iOS、macOS、Windows、Linux)
  • 從應用商店獲取版本資訊
  • 版本比較的簡單 API
  • 可設定的更新檢查頻率
  • 內建通知處理

適合對象

  • 需要自動更新檢測的應用程式
  • 需要版本控制的企業應用
  • 針對多個作業系統的應用
  • 尋求最小化設定以進行更新檢查的開發者
  • 具有嚴格版本控制策略的項目

使用建議

  • 需要互聯網連接以檢查版本
  • 可能需要針對非商店分發進行客製化
  • 僅限官方應用商店版本資料
  • 不適用於離線優先的應用程式
  • 依賴外部API,這些API可能有速率限制

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

☕ Support Me

If you find this plugin useful, please consider supporting me:

Buy Me a Coffee

Note Original repository: https://pub.dev/packages/new_version

The problem with the original repository is that it will no longer be maintained by the creator, for this reason this repository was created in order to maintain updated code and make respective improvements as long as it is required.

New Version Plus Plugin 🎉

A Flutter plugin that makes it possible to:

  • Check if a user has the most recent version of your app installed.
  • Show the user an alert with a link to the appropriate app store page.

See more at the Dart Packages page.

Screenshots

Installation

Add new_version_plus as a dependency in your pubspec.yaml file.

dependencies:
  new_version_plus: ^0.0.9

Usage

In main.dart (or wherever your app is initialized), create an instance of NewVersionPlus.

final newVersionPlus = NewVersionPlus();

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.

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.

You can then use the plugin in two ways.

Quickstart

Calling showAlertIfNecessary with your app's BuildContext will check if the app can be updated, and will automatically display a platform-specific alert that the user can use to go to the app store.

newVersionPlus.showAlertIfNecessary(context: context);

Advanced 😎

If you want to create a custom alert or use the app version information differently, call getVersionStatus. This will return a Future<VersionStatus> with information about the local and app store versions of the app.

final status = await newVersionPlus.getVersionStatus();
status.canUpdate // (true)
status.localVersion // (1.2.1)
status.storeVersion // (1.2.3)
status.appStoreLink // (https://itunes.apple.com/us/app/google/id284815942?mt=8)

If you want to present a customized dialog, you can pass your VersionStatus to showUpdateDialog().

newVersionPlus.showUpdateDialog(
  context: context,
  versionStatus: status,
  dialogTitle: 'Custom dialog title',
  dialogText: 'Custom dialog text',
  updateButtonText: 'Custom update button text',
  dismissButtonText: 'Custom dismiss button text',
  dismissAction: () => functionToRunAfterDialogDismissed(),
)

The option was added so that in the android app you can modify the code of your country, with the variable: androidPlayStoreCountry

所屬分類

依賴

依賴清單 4 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。