{"id":20766695,"url":"https://github.com/luo3house/flutter_update_modal","last_synced_at":"2026-04-21T12:03:02.256Z","repository":{"id":62138387,"uuid":"557960915","full_name":"luo3house/flutter_update_modal","owner":"luo3house","description":"Bugly style update modal on flutter","archived":false,"fork":false,"pushed_at":"2023-02-10T04:44:52.000Z","size":170,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-18T06:27:30.130Z","etag":null,"topics":["bugly","flutter-package","update-service","upgrade-helper"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/luo3house.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,"publiccode":null,"codemeta":null}},"created_at":"2022-10-26T16:19:00.000Z","updated_at":"2022-10-27T04:05:40.000Z","dependencies_parsed_at":"2024-11-17T23:32:11.846Z","dependency_job_id":null,"html_url":"https://github.com/luo3house/flutter_update_modal","commit_stats":{"total_commits":17,"total_committers":2,"mean_commits":8.5,"dds":0.4117647058823529,"last_synced_commit":"d5734c8aa1dc6d5611fece080d0f326419e47f9b"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luo3house%2Fflutter_update_modal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luo3house%2Fflutter_update_modal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luo3house%2Fflutter_update_modal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luo3house%2Fflutter_update_modal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/luo3house","download_url":"https://codeload.github.com/luo3house/flutter_update_modal/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243094246,"owners_count":20235478,"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":["bugly","flutter-package","update-service","upgrade-helper"],"created_at":"2024-11-17T11:25:37.098Z","updated_at":"2025-12-16T10:30:31.129Z","avatar_url":"https://github.com/luo3house.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# update_modal\n\n[![Pub Version](https://img.shields.io/pub/v/update_modal)](https://pub.dev/packages/update_modal)\n[![Github Action](https://github.com/luo3house/flutter_update_modal/actions/workflows/build-demo.yml/badge.svg)](https://luo3house.github.io/flutter_update_modal/)\n\nBugly style update modal on flutter. It is based on UI and cross platform.\n\n**Try the [Demo](https://luo3house.github.io/flutter_update_modal/)**\n\nExample project is at `example/`.\n\n![Modal Preview](./image/modal.png)\n\n## Getting Started\n\n### Install\n\nAdd dependency to `pubspec.yaml`.\n\n```yaml\ndependencies:\n  update_modal: ^0.0.3\n```\n\n### Implement checker, downloader, installer\n\n```dart\nclass MyUpdateService implements UpdateModalService {\n  @override\n  Future\u003cint\u003e cancelDownload() {\n    // Perform cancel download, resolve arbitary number\n  }\n\n  @override\n  Future\u003cUpdateInfo\u003e checkUpdate() async {\n    // Perform check update, resolve update info\n    // Resolve NULL means no update\n    return UpdateInfo()\n      ..name = \"ExampleUpdaterApp\"\n      ..version = \"3.2.0\"\n      ..size = \"13.6M\"\n      ..releasedAt = \"2022-10-26 22:20:01\"\n      ..description = \"Upgrade description\";\n  }\n\n  @override\n  Future\u003cint\u003e dismiss() {\n    // Perform dismiss to cleanup\n    return Future.value(0);\n  }\n\n  @override\n  Future\u003cint\u003e install() {\n    // Perform install package\n    return Future.value(0);\n  }\n\n  @override\n  Future\u003cStream\u003cint\u003e\u003e startDownload() {\n    // Perform download, resolve a stream for progress notification\n    // When progress \u003e 100(e.g. 101), the modal mark state to readyToInstall\n    return Future.value(Stream.fromFutures([\n      Future.delayed(Duration(milliseconds: 150 * 1), () =\u003e 20),\n      Future.delayed(Duration(milliseconds: 150 * 2), () =\u003e 40),\n      Future.delayed(Duration(milliseconds: 150 * 3), () =\u003e 60),\n      Future.delayed(Duration(milliseconds: 150 * 4), () =\u003e 80),\n      Future.delayed(Duration(milliseconds: 150 * 5), () =\u003e 100),\n      // modal show [Dismiss, Install] once receive progress \u003e 100\n      Future.delayed(Duration(milliseconds: 150 * 6), () =\u003e 120),\n    ]));\n  }\n}\n```\n\n### Perform check at App startup\n\n```dart\nclass MyApp extends StatefulWidget {\n  @override\n  createState() =\u003e _MyApp();\n}\n\nclass _MyApp extends State\u003cMyApp\u003e {\n  @override\n  initState() {\n    UpdateModal.init(\n      context,\n      service: UpdateModalServiceImpl(),\n    );\n  }\n}\n```\n\n## Debugging\n\nOpen a web server for cross-platform modal widget debugging.\n\n```bash\nmake example\n```\n\nor,\n\n```bash\ncd example; flutter run -d web-server --web-port=8080\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluo3house%2Fflutter_update_modal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluo3house%2Fflutter_update_modal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluo3house%2Fflutter_update_modal/lists"}