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

flutter_update_dialog 封面
套件詳情v2.0.0

flutter_update_dialog

一個漂亮的 Flutter 應用版本更新對話框。您可以自定義自己的版本更新彈窗!

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
227
喜歡數
58
Pub 分數
150

安裝套件

flutter pub add flutter_update_dialog

套件介紹

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

適用於 Flutter 應用程式的可自訂且視覺效果出色的版本更新對話方塊。它允許開發者在有新版本應用可用時顯示現代、使用者友善的更新提示。該對話方塊支援自訂樣式、可選的變更日誌顯示,並可在 Android、iOS、Web、macOS、Windows 和 Linux 等多個平台無縫整合。非常適合以最少的努力和最大的參與度提醒使用者更新應用。

適用情境

  • 應用版本升級通知
  • 可自定義的更新提示
  • 更新對話框中的變更日誌顯示
  • 跨平台更新提醒
  • 更新期間的使用者參與度
  • 應用內更新提醒

主要特色

  • 高度可自訂的使用者介面
  • 支援變更日誌顯示
  • 跨平台相容性
  • 透過 pub 輕鬆整合
  • 可設定的更新行為
  • 適用於所有裝置的響應式設計

適合對象

  • 尋求現代更新對話框的開發者
  • 需要頻繁更新版本的應用程式
  • 針對多個平台的專案
  • 希望獲得品牌化更新體驗的團隊
  • 具有活躍用戶參與策略的應用程式
  • 需要輕量級更新解決方案的項目

使用建議

  • 需要手動處理更新邏輯
  • 僅限UI展示,不包含下載功能
  • 可能需要額外的程式碼以實現自動更新
  • 不適用於靜默後台更新
  • 依賴外部伺服器進行版本檢查
  • 最佳搭配版本檢查服務

原始 README

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

flutter_update_dialog

Version Build Status Issue Star

Application version update dialog. With it, you can customize the logic of version update.

You can refer to the following project:

https://github.com/xuexiangjys/flutter_app_update_example

Getting Started

You should ensure that you add the flutter_update_dialog as a dependency in your flutter project.

// pub 集成
dependencies:
  flutter_update_dialog: ^2.0.0

//github  集成
dependencies:
  flutter_update_dialog:
    git:
      url: git://github.com/xuexiangjys/flutter_update_dialog.git
      ref: master

UseCase

Default Style
  void defaultStyle() {
    if (dialog != null && dialog.isShowing()) {
      return;
    }
    dialog = UpdateDialog.showUpdate(context,
        title: "是否升级到4.1.4版本?",
        updateContent: "新版本大小:2.0M\n1.xxxxxxx\n2.xxxxxxx\n3.xxxxxxx",
        onUpdate: onUpdate);
  }
Custom Style
  void customStyle() {
    if (dialog != null && dialog.isShowing()) {
      return;
    }
    dialog = UpdateDialog.showUpdate(context,
        width: 250,
        title: "是否升级到4.1.4版本?",
        updateContent: "新版本大小:2.0M\n1.xxxxxxx\n2.xxxxxxx\n3.xxxxxxx",
        titleTextSize: 14,
        contentTextSize: 12,
        buttonTextSize: 12,
        topImage: Image.asset('assets/bg_update_top.png'),
        extraHeight: 5,
        radius: 8,
        themeColor: Color(0xFFFFAC5D),
        progressBackgroundColor: Color(0x5AFFAC5D),
        isForce: true,
        updateButtonTxt: '升级',
        ignoreButtonTxt: '忽略此版本',
        enableIgnore: true, onIgnore: () {
          ToastUtils.waring("忽略");
          dialog.dismiss();
        },
        onUpdate: onUpdate);
  }

Property value

Name Type Default Description
width double 0.618 * screenWidth dialog width
title String / dialog title
updateContent String / Update the modified content
onUpdate VoidCallback / Click on the update button event
titleTextSize double 16.0 The size of the title text
contentTextSize double 14.0 The size of the update content text
buttonTextSize double 14.0 The size of the button text
themeColor Color Colors.red Theme color
progressBackgroundColor Color 0xFFFFCDD2 The background color of the progress bar
topImage Image / Picture at the top
extraHeight double 5.0 Extra height from top image
radius double 4.0 Angle of corner
enableIgnore bool false Whether to enable the ignore version button
updateButtonText String '更新' Update button text
ignoreButtonText String '忽略此版本' Ignore button text
isForce bool false Whether to force update
onIgnore VoidCallback / Click on the ignore button event

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。