firebase_update 1.0.5
firebase_update: ^1.0.5 copied to clipboard
Flutter force update, maintenance mode & patch notes via Firebase Remote Config. Real-time, server-controlled, with built-in UI and full customization.
1.0.5 #
Bug fixes #
- Force→optional snooze regression: When a snooze was active and the server raised the minimum version (triggering a force update), rolling the minimum back to optional would silently suppress the optional dialog — the force dialog dismissed but nothing appeared. Fixed by clearing any active optional snooze as soon as a force update state is presented. The user was blocked by the server, not voluntarily deferring, so the snooze should not persist through a force update event
snoozedForVersionnot persisted:_snoozedForVersionwas held in-memory only. After a restart the version-mismatch check that clears a stale snooze when a newer version is offered was always skipped, meaning a snooze for v1.x could silently suppress an optional prompt for v1.y in a new session. Fixed by persisting the snooze target version via the newsetSnoozedForVersion/getSnoozedForVersionmethods onFirebaseUpdatePreferencesStore— both with no-op defaults so custom store implementations are not broken
Store interface additions (non-breaking) #
FirebaseUpdatePreferencesStore.getSnoozedForVersion()— default returnsnullFirebaseUpdatePreferencesStore.setSnoozedForVersion(String version)— default is a no-opclearSnoozedUntil()now also removes the persistedsnoozedForVersioninSharedPreferencesFirebaseUpdateStore
1.0.4 #
- Integration test screenshots: Added
example/integration_test/screenshot_test.dart— captures 8 UI states (optional dialog, optional sheet, force dialog, force sheet, maintenance dialog, maintenance sheet, patch notes expanded, home screen) viaflutter drive. Addedscripts/take_screenshots.shto run screenshot capture against a connected device or simulator. Screenshots are saved toscreenshots/at the package root and used as README assets - Analytics callbacks (zero new dependencies): Four new optional callbacks on
FirebaseUpdateConfig—onDialogShown(state),onDialogDismissed(state),onSnoozed(version, duration),onVersionSkipped(version). Wire these to Firebase Analytics, Mixpanel, Amplitude, or any SDK your app already uses FirebaseUpdateCardinline widget: NewFirebaseUpdateCardwidget usingFirebaseUpdateBuilderinternally. Renders nothing when state isidleorupToDate. Shows a styled tinted card foroptionalUpdate,forceUpdate,maintenance, andshorebirdPatchstates. Accepts optionalonUpdateTapandonLaterTapoverrides. Drop into settings screens, home feeds, or any scrollable layoutcheckNow()already existed — no new API required. WiredlistenToRealtimeUpdates: falseproperly: when set, the real-time RC subscription is not started andcheckNow()is the only way to refresh state- Desktop layout: New
desktopMaxDialogWidth(default480) onFirebaseUpdatePresentationTheme. On macOS, Windows, and Linux the dialog content is capped at this width so it doesn't stretch across wide monitors. Has no effect on mobile - Allowed flavors whitelist: New
allowedFlavors: List<String>?onFirebaseUpdateConfig. ReadsString.fromEnvironment('FLAVOR')at runtime — when set, all UI and state emission is suppressed if the current flavor is not in the list. Defaultnull= always active. Pass--dart-define=FLAVOR=productionat build time to activate
1.0.3 #
- Renamed presentation callbacks:
FirebaseUpdatePresentationDatacallbacks renamed fromonPrimaryTap/onSecondaryTap/onTertiaryTaptoonUpdateClick/onLaterClick/onSkipClickfor clarity - Dismiss booleans: Added
dismissOnUpdateClick,dismissOnLaterClick,dismissOnSkipClick(all defaulttrue) toFirebaseUpdatePresentationData— controls whether the modal auto-dismisses after each button tap; custom widget builders can set any tofalseto handle navigation themselves - Real-time snooze: Tapping "Later" now starts a timer internally — the optional update dialog re-appears automatically after the snooze duration elapses, without requiring an app restart or a new Remote Config push. Version-aware: a different
latestVersionclears the snooze immediately and re-prompts - Store fallback always opens: When the app is not found on the store (e.g. staging build), the launcher now opens the store home page (
https://apps.apple.com/on iOS/macOS,market://searchon Android,ms-windows-store://on Windows) instead of showing an error toast - Removed error toast: The "Unable to open the update link" snackbar is gone — the store always opens via one of the four priority tiers
1.0.2 #
- RC-driven store URLs:
store_url_android,store_url_ios,store_url_macos,store_url_windows,store_url_linux,store_url_webcan now be set in the Remote Config JSON payload. When present, they take priority over the localFirebaseUpdateConfig.fallbackStoreUrlsvalues, allowing store URLs to be updated without a rebuild.
1.0.1 #
- Topics: Added pub.dev topics (
updates,versioning,remote-config,firebase,app-management) - Store launch override: New
onStoreLaunchcallback onFirebaseUpdateConfig— replaces the defaultapp_review+url_launcherstore-open flow with your own logic; dialog dismisses automatically after the callback returns - Button callback hooks:
onForceUpdateTap,onOptionalUpdateTap,onOptionalLaterTaponFirebaseUpdateConfig— fire in addition to default behavior for analytics and side effects - Skip version: Opt-in
showSkipVersion: boolconfig flag adds a persistent "Skip this version" tertiary button to optional-update prompts; persists across restarts viashared_preferences - Session dismiss (default): Tapping "Later" now suppresses the optional-update prompt for the current app session. The prompt reappears on the next launch
- Timed snooze (opt-in): Set
snoozeDuration(e.g.Duration(hours: 24)) to persist the snooze across restarts — the prompt stays hidden until the duration elapses - Persistence: New
FirebaseUpdatePreferencesStoreabstract interface +SharedPreferencesFirebaseUpdateStoredefault implementation; inject a custom store viaFirebaseUpdateConfig.preferencesStore - Programmatic skip/snooze API:
FirebaseUpdate.instance.snoozeOptionalUpdate(),skipVersion(),dismissOptionalUpdateForSession(),clearSnooze(),clearSkippedVersion()— lets customoptionalUpdateWidgetbuilders drive SDK state without relying on built-in buttons - Shorebird patches: New
FirebaseUpdatePatchSourceabstract interface,FirebaseUpdateKind.shorebirdPatchstate,patchSource+onPatchApplied+shorebirdPatchWidgetconfig fields, and a built-in patch dialog/sheet with async download progress indicator;onPatchAppliedcallback lets you trigger your own restart logic - Labels: Added
skipVersion,patchAvailableTitle,patchAvailableMessage,applyPatchtoFirebaseUpdateLabels - Presentation data: Added
tertiaryLabelandonTertiaryTaptoFirebaseUpdatePresentationData(andcopyWith) - Dependencies: Added
shared_preferences: ">=2.2.0 <4.0.0"
1.0.0 #
First stable release.
- Firebase Remote Config driven update state: optional update, force update, maintenance mode
- Fixed Remote Config schema —
FirebaseUpdateConfig()works with zero required parameters remoteConfigKeydefaults tofirebase_update_config, override if needed- Real-time Remote Config listening via
onConfigUpdatedwith opt-out support - Package-managed default UI: optional update dialog, optional update bottom sheet, force update dialog, maintenance dialog
- Custom builder hooks to replace any default surface with your own widget
FirebaseUpdateBuilder— reactive widget for building in-screen update surfacesFirebaseUpdateContentAlignmentenum to control icon, title, and body alignment across all surfaces- Skip-version behavior: tapping Later suppresses the same version; clears when a newer version arrives
- Patch notes with read-more expansion for plain text (5-line threshold) and HTML content
- Per-platform store URLs via
FirebaseUpdateStoreUrls - Native store listing launch via
app_reviewwith URL fallback - Theme tokens: surface, accent, content, outline, barrier, blur, hero gradient, border radius
- 19 widget tests covering initialization, optional update, force update, maintenance, escalation, skip-version, and patch notes rendering