version_gate 1.1.0
version_gate: ^1.1.0 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.1.0 - 2026-03-04 #
Added #
- Custom HTTP headers — pass
headerstoVersionGate()for apps behind corporate proxies or CDNs that require auth headers on outbound requests - Minimum version enforcement — set
minimumVersion: '2.0.0'to automatically force updates for critically outdated versions while keeping optional mode for newer ones - Callbacks —
onUpdateAvailable,onNoUpdate, andonErrorcallbacks for analytics tracking without manually inspecting the result - Localization — new
UpdateStringsclass with factory constructors for 10 languages: English, Arabic, Spanish, French, German, Turkish, Urdu, Chinese, Japanese, Korean. Passstrings: UpdateStrings.arabic()to show all built-in widgets in the target language UpdateStringssupports custom text and{storeVersion}/{localVersion}placeholders
Changed #
- Built-in widgets (
UpdateDialog,UpdateBanner,UpdateBlockScreen) now resolve text fromUpdateStringswhen available, falling back to English defaults VersionCheckResultnow carries an optionalstringsfield for localization
1.0.5 - 2026-03-04 #
1.0.2 - 2026-03-03 #
Fixed #
- Fixed GitHub Actions CI workflow — removed
--fatal-infosflag anddart pub publish --dry-runstep that caused false failures
1.0.1 - 2026-03-03 #
Fixed #
- Added
constconstructors in test files to resolve allprefer_const_constructorslint warnings - Added GitHub Actions CI workflow for automated analysis and testing
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
