core/app_version_gate library

Classes

AppVersionGateConfig
Immutable version-gate policy — from a bundled asset default, a remote override (via AppVersionGateController), or built directly for a pure evaluateVersionGate call/test.
AppVersionGateController
Reads version-gate policy from a RemoteConfigService (which already gives "asset default, remote merges in, remote fail/corrupt keeps last-good" for free — see ENH-58) and evaluates it — no separate cache of its own, since RemoteConfigService already is the last-known-good cache. Keys read: appVersionMinimum, appVersionRecommended, appVersionMaintenanceActive, appVersionMaintenanceMessage, appVersionStoreUrl.

Enums

GateDecision
What an app should show for the current version/maintenance state. Ordered by severity: maintenance and forceUpdate block play, softUpdate is dismissible, ok shows nothing.

Functions

compareAppVersions(String a, String b) → int?
Compares a to b as semver strings, per this policy:
evaluateVersionGate({required String currentVersion, required AppVersionGateConfig config}) → GateDecision
Pure decision function — no I/O, no singletons, easy to fixture-test.