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

updat のカバー
パッケージ詳細v1.4.0

updat

Updat は、アプリケーションの更新を処理する、使いやすく信頼性の高い Flutter-Native オートアップデートツールです。

AndroidiOSmacOSWindowsLinux
30日間ダウンロード
3100
いいね数
39
Pub ポイント
160

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

flutter pub add updat

パッケージ概要

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

Updat は、複数のプラットフォームでアプリケーションの更新を管理するためのシンプルかつ信頼性の高い Flutterネイティブパッケージです。Flutterアプリ内で更新の確認、ダウンロード、適用をスムーズに行うプロセスを簡素化しています。統合のしやすさを意識して開発されており、Android、iOS、macOS、Windows、Linuxをサポートしており、堅牢な更新メカニズムを必要とするクロスプラットフォームアプリに最適です。バックグラウンドでのダウンロード、バージョン比較、更新後の自動再起動を処理し、ユーザー体験を滑らかに保ちます。軽量な設計と明確なAPIにより、すべてのレベルの開発者にとって使いやすいです。

用途

  • クロスプラットフォームのFlutterアプリにおけるアプリ更新の自動化
  • デスクトップおよびモバイルでのサイレントバックグラウンド更新の処理
  • 更新のインストール後に自動再起動を有効にする
  • 起動時またはスケジュールされたインターバルで更新チェックを管理する
  • 更新の試行が失敗した際のフォールバックメカニズムの提供

主な機能

  • クロスプラットフォーム対応(Android、iOS、macOS、Windows、Linux)
  • 最小限のボイラープレートによるシンプルな統合
  • バックグラウンド更新のダウンロードとインストール
  • 更新後の自動アプリ再起動
  • バージョンの比較と更新の検出

適している対象

  • クロスプラットフォームのFlutterアプリを開発する開発者
  • 信頼できる自動更新機能を必要とするチーム
  • デスクトップおよびモバイルでシームレスな更新体験を必要とするアプリ
  • 更新におけるユーザーの関与を最小限に抑えることが重要なプロジェクト
  • 技術的な知識が限られた環境にいるユーザーを対象としたアプリケーション

注意事項

  • 更新マニフェスト用の適切なサーバーサイドのセットアップが必要です
  • 更新のロールバックを処理するためのカスタムロジックが必要になる可能性があります
  • 複雑な更新ワークフローを必要とするアプリには適していません
  • 追加コードなしで更新のUI/UXに限定的なカスタマイズが可能
  • サーバー上にホストされている外部の更新メタデータに依存しています

元の README

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

Updat - The simple-to-use, flutter-based desktop update package

Logo

Updat is a simple-to-use reliable flutter-native updater that handles your application's updates. All you need is a place to host your files and a place to check for the latest version.

License Pub.dev Github Issues Github Wiki

Demo

demo

Installing

To get started simply type flutter pub add updat in your terminal.

🎉 Done, It's that simple.

Getting Started

Integration with your app requires just a few lines of code, add the following widget wherever you want your updat widget to be:

UpdatWidget(
  currentVersion: "1.0.0",
  getLatestVersion: () async {
    // Here you should fetch the latest version. It must be semantic versioning for update detection to work properly.
    return "1.0.1";
  },
  getBinaryUrl: (latestVersion) async {
    // Here you provide the link to the binary the user should download. Make sure it is the correct one for the platform!
    return "https://github.com/latest/release/bin.exe";
  },
  // Lastly, enter your app name so we know what to call your files.
  appName: "Updat Example",
),

That should get you up and running in just a few seconds ⚡️.

or use the UpdatWindowManager, and let updat handle everything on autopilot. Just place it right after your MaterialApp.

Want to learn how to integrate Updat in your app?

Integration Instructions

Configuration

Available UpdatWidget arguments
Parameter Type Value Default
currentVersion String Required. Must be a semantic version. This is the current package's version. N/A
getLatestVersion Future<String> Required. Must be a semantic version. This should request the latest version to the server N/A
getBinaryUrl Future<String> Required. This should provide the link download the binary for a certain app version. Arguments: latestVersion N/A
appNme String Required. The Application's name. It is used to name the binaries when downloading. N/A
getChangelog Future<String> This will render a plain text view of the changelog. N/A
callback void Function(UpdatStatus) A callback that is called when the UpdatStatus gets updated. N/A
controller UpdatController Optional controller for programmatic update checks and actions. N/A
getDownloadFileLocation Future<File> Choose where to download the update. N/A
updateChipBuilder Widget Function(...) Overrides the default update chip. N/A
updateDialogBuilder Widget Function(...) Overrides the default update dialog. N/A
openOnDownload bool Whether Updat should open the installer automatically once it has been downloaded. true
closeOnInstall bool Whether Updat should close the application automatically once it has been downloaded. false
Theming

Logo

Updat is extremely easy to theme. We also use updateChipBuilder and updateDialogBuilder internally to design our widgets, so you have the same customizability we do. We provide a couple of themes to get you started.

To change the theme simply add the desired theme to the builder and you're set.

Chips
  • defaultChip which is an elevatedButton that only shows when an update is available. Shown by default.

  • defaultChipWithCheckFor which is an elevatedButton that shows under all conditions, allowing to recheck for updates.

  • defaultChipWithSilentDownload which is an elevatedButton that only shows when an update is downloaded and ready to install.

  • flatChip which is an textButton that only shows when an update is available

  • flatChipWithCheckFor which is an textButton that shows under all condition, allowing to recheck for updates.

  • flatChipWithSilentDownload which is an textButton that only shows when an update is downloaded and ready to install.

  • floatingExtendedChip which is a compact version of the dialog, which is a bit bigger and grabs user's attention more easily.

  • floatingExtendedChipWithSilentDownload which is a compact version of the dialog, which is a bit bigger and grabs user's attention more easily, and only shows when the update is ready to be installed.

Dialogs
  • defaultDialog which is the default, M2 and M3 dialog that shows by default.
Programmatic update checks

Use an UpdatController to re-check for updates after the initial check completes — for example when your backend signals a new release via push notification or websocket:

final updatController = UpdatController();

UpdatWindowManager(
  controller: updatController,
  // ...
)

// Later, when your backend alerts the user:
await updatController.checkForUpdate(notifyIfAvailable: true);

The *WithCheckFor chip themes also expose a UI button to recheck manually.

Advanced Usage

If you need to send additional HTTP headers when downloading a release asset, you may define your headers by setting the downloadReleaseHeaders property of UpdatGlobalOptions, you should probably do this in the main function of your code.

UpdatGlobalOptions.downloadReleaseHeaders = {
  "Authorization": "Bearer gh_pat_1234567889abcdefghijklm",
}

カテゴリー

依存関係

依存関係一覧 8 件

ソースリポジトリ

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

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