version_gate 1.0.1
version_gate: ^1.0.1 copied to clipboard
Lightweight Flutter package that checks for app updates on App Store and Google Play with zero configuration, smart frequency guards, and customizable UI.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
1.0.0 - 2026-03-03 #
🎉 Initial Release #
Core Features:
- Zero-configuration version checking — reads bundle ID and app version automatically via
package_info_plus - iOS support via iTunes Lookup API (JSON, free, no authentication)
- Android support via Google Play Store HTML parsing (multi-pattern regex for resilience)
Frequency Guard:
- Smart check throttling with
SharedPreferences— prevents repeated, annoying update prompts - Built-in frequencies:
onceDaily(default),oncePerSession,oncePerWeek,always - Custom frequency support:
CheckFrequency.custom(hours: 12)
Update Modes:
UpdateMode.optional— dismissible dialog, user can tap "Later"UpdateMode.flexible— persistent banner, app remains usableUpdateMode.forced— full-screen blocker, cannot be dismissed (intercepts back button)
Built-in Widgets:
UpdateDialog— Material dialog with customizable title, message, buttons, and release notesUpdateBanner— persistentMaterialBannerwith dismiss and update actionsUpdateBlockScreen— full-screen forced update withPopScopeback-button interception
Version Comparison:
- Semantic versioning:
major.minor.patch - Build metadata stripping:
1.2.3+45→1.2.3 - Pre-release support:
2.0.0-beta.1<2.0.0 - Handles partial versions:
1.2treated as1.2.0
Error Handling:
check()never throws — all errors caught internally- Returns
hasUpdate: falsewitherrorfield on failure - Network timeouts (10s) prevent hanging
- Timestamp saved only after successful API call — retries on next launch if network fails
Dependencies:
package_info_plus— auto-read bundle ID and versionshared_preferences— persist last-check timestamphttp— store API callsurl_launcher— open store listing