Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Vergate: a version gate for Flutter with force update, soft update and maintenance mode

说明与用途

Vergate 是一个 Flutter 包,使用 JSON 配置和多种数据源实现强制更新、软更新和维护模式,减少项目间重复代码。

问题

Developers need a reusable solution to enforce app version policies (force update, soft update, maintenance mode) without rewriting checks for each app.

结果

Vergate centralizes version gating logic, reducing code duplication and ensuring consistent update enforcement across Flutter apps.

工作流

  • 1. Add Vergate package to pubspec.yaml.
  • 2. Create a VergateController with a data source (e.g., JsonUrlSource).
  • 3. Call vergate.start() before runApp().
  • 4. Wrap the app with VergateGate to display the gate overlay.
  • 5. Configure JSON rules (min_version, latest_version, maintenance window, store links).
  • 6. Optionally customize UI or provide a custom source via VergateSource interface.

证据

I just published Vergate, a Flutter package that decides whether the installed version of your app may run.

来源

Force update: a dialog that cannot be dismissed, driven by min_version

来源

Soft update: a banner or dialog, driven by latest_version, with "Remind me later" and "Skip this version" remembered between launches

来源

Maintenance mode: an optional from/until window, a live countdown, and an automatic re-check when the window ends

来源

Per-platform rules: separate versions and store links for Android and iOS

来源

Fail-open: network or parsing errors never lock the user out

来源

Re-checks on app resume: users who return from the store get in right away

来源

Vergate does not depend on Firebase or any specific service. The rules are a small JSON document, and it ships with a few ways to load it: JsonUrlSource, CallbackSource, ItunesLookupSource, FallbackSource

来源

The gate is an overlay, not a route, so it works above the Navigator and your app's state is never lost.

来源

There is no store lookup for Android, because Google Play has no official API for it. Put the Android version in your own config.

来源

The update button opens the store page. Android's In-App Update API is not used.

来源

  • 记录日期: 2026-10-03T19:55:53.860Z