搜索插件、代码仓与 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

所属分类

源码仓库

使用此插件的项目

暂无相关数据。