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

new_version のカバー
パッケージ詳細v0.3.1

new_version

ユーザーがFlutterアプリの最新バージョンを持っているか確認します。

AndroidiOSmacOSWindowsLinux
30日間ダウンロード
456
いいね数
618
Pub ポイント
130

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

flutter pub add new_version

パッケージ概要

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

new_version パッケージは、Flutter アプリがリモートソース(JSON ファイルや API エンドポイントなど)に指定されたバージョンと照合することで、現在のバージョンが最新かどうかを確認するのに役立ちます。Android、iOS、macOS、Windows、Linux などの複数のプラットフォームをサポートしています。新しいバージョンが利用可能になると、開発者がユーザーにアプリの更新を促すことができ、ユーザー体験を向上させ、最新の機能およびセキュリティ修正へのアクセスを保証します。軽量で、最小限の構成で簡単に統合できます。

用途

  • ユーザーにアプリの更新を促す
  • アプリ起動時に更新を確認する
  • バージョン互換性を確認する
  • 新しいリリースについてユーザーに通知する
  • CI/CDワークフローとの統合

主な機能

  • クロスプラットフォーム対応
  • シンプルな統合
  • リモートバージョンの確認
  • カスタマイズ可能な更新プロンプト
  • JSON および HTTP エンドポイントをサポートしています

適している対象

  • バージョン管理を必要とするアプリ
  • アプリの更新を管理する開発者
  • 頻繁なリリースを持つプロジェクト
  • ユーザー向けモバイルアプリケーション
  • 自動デプロイを使用するチーム

注意事項

  • インターネット接続が必要です
  • 外部のバージョンソースに依存しています
  • キャッシュ戦略が必要になる可能性があります
  • オフライン優先のアプリには適していません
  • バージョン比較ロジックを定義する必要があります

元の README

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

Archive Notice

This plugin is relatively stable and feature-complete, but I won't be working on it or accepting pull requests going forward. If anyone is interested in taking over as maintainer, feel free to email me. I'm also happy to link to popular forks that have spun off. Thanks.

New Version 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 as a dependency in your pubspec.yaml file.

dependencies:
  new_version: ^0.3.0

Usage

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

final newVersion = NewVersion();

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.

newVersion.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 newVersion.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().

newVersion.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(),
)

カテゴリー

依存関係

依存関係一覧 5 件

ソースリポジトリ

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

データはまだありません。