{"id":19765709,"url":"https://github.com/xuexiangjys/flutter_update_dialog","last_synced_at":"2025-07-13T18:39:26.653Z","repository":{"id":40642002,"uuid":"284485253","full_name":"xuexiangjys/flutter_update_dialog","owner":"xuexiangjys","description":"Application version update dialog.","archived":false,"fork":false,"pushed_at":"2023-12-15T08:16:01.000Z","size":338,"stargazers_count":31,"open_issues_count":5,"forks_count":11,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-06-21T00:18:08.319Z","etag":null,"topics":["dialog","flutter-package","xupdate"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xuexiangjys.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2020-08-02T15:09:40.000Z","updated_at":"2024-02-01T08:43:53.000Z","dependencies_parsed_at":"2024-02-14T03:41:33.529Z","dependency_job_id":null,"html_url":"https://github.com/xuexiangjys/flutter_update_dialog","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xuexiangjys%2Fflutter_update_dialog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xuexiangjys%2Fflutter_update_dialog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xuexiangjys%2Fflutter_update_dialog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xuexiangjys%2Fflutter_update_dialog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xuexiangjys","download_url":"https://codeload.github.com/xuexiangjys/flutter_update_dialog/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224214801,"owners_count":17274686,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dialog","flutter-package","xupdate"],"created_at":"2024-11-12T04:19:11.104Z","updated_at":"2024-11-12T04:19:12.308Z","avatar_url":"https://github.com/xuexiangjys.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# flutter_update_dialog\n\n[![Version](https://img.shields.io/badge/version-2.0.0-blue.svg)](https://pub.dev/packages/flutter_update_dialog)\n[![Build Status](https://travis-ci.org/xuexiangjys/flutter_update_dialog.svg?branch=master)](https://travis-ci.org/xuexiangjys/flutter_update_dialog)\n[![Issue](https://img.shields.io/github/issues/xuexiangjys/flutter_update_dialog.svg)](https://github.com/xuexiangjys/flutter_update_dialog/issues)\n[![Star](https://img.shields.io/github/stars/xuexiangjys/flutter_update_dialog.svg)](https://github.com/xuexiangjys/flutter_update_dialog)\n\nApplication version update dialog. With it, you can customize the logic of version update.\n\nYou can refer to the following project:\n\n[https://github.com/xuexiangjys/flutter_app_update_example](https://github.com/xuexiangjys/flutter_app_update_example)\n\n## Getting Started\n\nYou should ensure that you add the `flutter_update_dialog` as a dependency in your flutter project.\n\n\n```\n// pub 集成\ndependencies:\n  flutter_update_dialog: ^2.0.0\n\n//github  集成\ndependencies:\n  flutter_update_dialog:\n    git:\n      url: git://github.com/xuexiangjys/flutter_update_dialog.git\n      ref: master\n```\n\n\n## UseCase\n\n### Default Style\n\n```\n  void defaultStyle() {\n    if (dialog != null \u0026\u0026 dialog.isShowing()) {\n      return;\n    }\n    dialog = UpdateDialog.showUpdate(context,\n        title: \"是否升级到4.1.4版本？\",\n        updateContent: \"新版本大小:2.0M\\n1.xxxxxxx\\n2.xxxxxxx\\n3.xxxxxxx\",\n        onUpdate: onUpdate);\n  }\n```\n\n\n### Custom Style\n\n```\n  void customStyle() {\n    if (dialog != null \u0026\u0026 dialog.isShowing()) {\n      return;\n    }\n    dialog = UpdateDialog.showUpdate(context,\n        width: 250,\n        title: \"是否升级到4.1.4版本？\",\n        updateContent: \"新版本大小:2.0M\\n1.xxxxxxx\\n2.xxxxxxx\\n3.xxxxxxx\",\n        titleTextSize: 14,\n        contentTextSize: 12,\n        buttonTextSize: 12,\n        topImage: Image.asset('assets/bg_update_top.png'),\n        extraHeight: 5,\n        radius: 8,\n        themeColor: Color(0xFFFFAC5D),\n        progressBackgroundColor: Color(0x5AFFAC5D),\n        isForce: true,\n        updateButtonTxt: '升级',\n        ignoreButtonTxt: '忽略此版本',\n        enableIgnore: true, onIgnore: () {\n          ToastUtils.waring(\"忽略\");\n          dialog.dismiss();\n        },\n        onUpdate: onUpdate);\n  }\n```\n\n## Property value\n\nName | Type | Default | Description\n:-|:-:|:-:|:-\nwidth | double | 0.618 * screenWidth | dialog width\ntitle | String | / | dialog title\nupdateContent | String | / | Update the modified content\nonUpdate | VoidCallback | / | Click on the update button event\ntitleTextSize | double | 16.0 | The size of the title text\ncontentTextSize | double | 14.0 | The size of the update content text\nbuttonTextSize | double | 14.0 | The size of the button text\nthemeColor | Color | Colors.red | Theme color\nprogressBackgroundColor | Color | 0xFFFFCDD2 | The background color of the progress bar\ntopImage | Image | / | Picture at the top\nextraHeight | double | 5.0 | Extra height from top image\nradius | double | 4.0 | Angle of corner\nenableIgnore | bool | false | Whether to enable the ignore version button\nupdateButtonText | String | '更新' | Update button text\nignoreButtonText | String | '忽略此版本' | Ignore button text\nisForce | bool | false | Whether to force update\nonIgnore | VoidCallback | / | Click on the ignore button event\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxuexiangjys%2Fflutter_update_dialog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxuexiangjys%2Fflutter_update_dialog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxuexiangjys%2Fflutter_update_dialog/lists"}