Force update
Skill launch52-ai/flutter-template/.claude/skills/force-update
Template for Flutter mobile applications.
npx -y skills add launch52-ai/flutter-template --skill force-updateAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Implement in-app update prompts with version checking, force/soft updates, Android In-App Updates, and store redirects. Supports Supabase and Firebase Remote Config backends. Use when adding update dialogs, version management, or blocking outdated app versions.
SKILL.md
7.7 KB, as published. Nobody here has run it
Force Update / App Update
Implement version checking and in-app update prompts to keep users on supported app versions.
When to Use This Skill
- Adding force update functionality to block outdated versions
- Implementing soft update prompts for optional updates
- Setting up Android In-App Updates for seamless upgrades
- Configuring version management via Supabase or Firebase Remote Config
- User asks "force update", "app update", "version check", or "update dialog"
When NOT to Use This Skill
- OTA code updates (Flutter doesn't support this like React Native) - Use store updates
- App store submission process - Use
/releaseinstead - CI/CD build versioning - Use
/ci-cdinstead
Questions to Ask
- Update strategy: Force update only, soft update only, or both?
- Backend: Supabase, Firebase Remote Config, or custom REST API?
- Android In-App Updates: Enable flexible/immediate updates via Play Store?
- Minimum version logic: Per-platform, per-feature, or global minimum?
Quick Reference
Update Types
| Type | Behavior | When to Use |
|---|---|---|
| Force Update | Blocks app until updated | Security fixes, breaking API changes |
| Soft Update | Dismissible prompt | New features, minor improvements |
| In-App Update (Android) | Download without leaving app | Any update, better UX |
| Maintenance Mode | Blocks app entirely | Server downtime, critical issues |
Version Comparison
| Current | Minimum | Force Min | Result |
|---|---|---|---|
| 1.0.0 | 1.2.0 | 1.1.0 | Force update required |
| 1.1.5 | 1.2.0 | 1.1.0 | Soft update available |
| 1.2.0 | 1.2.0 | 1.1.0 | Up to date |
Commands
# Validate force-update implementation
dart run .claude/skills/force-update/scripts/check.dart
# Check specific aspects
dart run .claude/skills/force-update/scripts/check.dart --check version-service
dart run .claude/skills/force-update/scripts/check.dart --check dialogs
Workflow
Phase 1: Setup Dependencies
-
Add required packages to
pubspec.yaml:package_info_plus- Get current app versionin_app_update(Android only) - Play Store in-app updatesurl_launcher- Open app stores
-
Configure version source (choose one):
- Supabase: Create
app_versionstable - Firebase Remote Config: Add version parameters
- Supabase: Create
Phase 2: Implement Version Service
- Create
AppVersionServiceinlib/core/services/ - Implement version comparison logic (semantic versioning)
- Add platform-specific store URLs
- Create
VersionInfomodel with Freezed
Phase 3: Add Update UI
- Create
ForceUpdateScreen- Full-screen blocker - Create
SoftUpdateDialog- Dismissible bottom sheet - Create
MaintenanceScreen- Server downtime blocker - Implement
UpdateNotifierwith Riverpod
Phase 4: Integrate Check
- Add version check to app startup (
main.dartor splash) - Handle background-to-foreground transitions
- Configure periodic checks for long sessions
Phase 5: Android In-App Updates (Optional)
- Implement
InAppUpdateServicewrapper - Choose update type: flexible (background) or immediate (blocking)
- Handle download progress and install prompts
Core API
See: reference/ for complete implementations. Basic usage:
final versionInfo = await ref.read(versionServiceProvider).checkVersion();
// Handle: versionInfo.status (upToDate, softUpdateAvailable, forceUpdateRequired, maintenanceMode)
File Structure
After using this skill:
lib/
├── core/
│ └── services/
│ ├── app_version_service.dart
│ └── in_app_update_service.dart # Android only
└── features/
└── force_update/
├── domain/
│ ├── entities/
│ │ └── version_info.dart
│ └── enums/
│ └── update_status.dart
├── data/
│ ├── models/
│ │ └── version_info_dto.dart
│ └── repositories/
│ └── version_repository_impl.dart
└── presentation/
├── screens/
│ ├── force_update_screen.dart
│ └── maintenance_screen.dart
├── widgets/
│ └── soft_update_dialog.dart
└── providers/
└── update_notifier.dart
Failure Types
| Type | When | UI Action |
|---|---|---|
VersionCheckFailure | Network error checking version | Retry or continue (configurable) |
StoreOpenFailure | Can't open app store | Show manual store link |
InAppUpdateFailure | Android update download failed | Fallback to store redirect |
Guides
| File | Content |
|---|---|
| version-checking-guide.md | Backend setup, version comparison logic |
| update-dialogs-guide.md | Dialog behavior, frequency limits, back prevention |
| in-app-updates-guide.md | Android Play Store in-app updates |
Reference Files
See: reference/ for complete implementations:
reference/entities/- VersionInfo, UpdateStatusreference/services/- AppVersionService, InAppUpdateServicereference/providers/- UpdateNotifier with Riverpodreference/screens/- ForceUpdateScreen, MaintenanceScreenreference/widgets/- SoftUpdateDialog
Checklist
Backend Setup:
- Version endpoint configured (Supabase table or Remote Config)
- Minimum version field set
- Force minimum version field set
- Platform-specific versions if needed (iOS/Android)
Version Service:
-
package_info_plusadded to dependencies -
AppVersionServicecreated - Semantic version comparison implemented
- Store URLs configured for both platforms
Update UI:
-
ForceUpdateScreenimplemented (non-dismissible) -
SoftUpdateDialogimplemented (dismissible) -
MaintenanceScreenimplemented - Update button opens correct store
Integration:
- Version check runs on app startup
- Version check runs on foreground resume
- Error handling for network failures
- Analytics events for update prompts
Android In-App Updates (if enabled):
-
in_app_updatepackage added -
InAppUpdateServicewrapper created - Flexible vs immediate strategy chosen
- Download progress UI implemented
Related Skills
/release- App store preparation and signing/ci-cd- Build versioning and deployment/analytics- Track update prompt interactions/i18n- Localize update dialog strings/design- Polish update screen UI/a11y- Add accessibility to update screens
Common Issues
See: version-checking-guide.md for error handling, caching, and troubleshooting.
Key points:
- Use timeout on version checks to avoid blocking app launch
- iOS store URL format:
https://apps.apple.com/app/id{APP_ID} - Android In-App Updates only work with Play Store installs
Next Steps
After implementing force update:
/i18n- Localize all user-facing strings/design- Polish UI, loading states, visual feedback/a11y- Add semantic labels, ensure accessibility/analytics- Add update prompt tracking events/ci-cd- Automate version bumping in CI