| name | update-flutter-dependencies |
| description | Safely upgrade Flutter SDK, Dart/Flutter packages, and Apple-platform native dependencies with deterministic checks and rollback options. |
Update Flutter Dependencies
Use this skill for SDK and package upgrades that must stay stable and reviewable.
Workflow
- Capture baseline:
flutter --version
flutter doctor -v
flutter pub get
- baseline checks (
flutter analyze + impacted tests)
- If Flutter SDK upgrade is in scope, upgrade Flutter SDK:
flutter upgrade
- record updated
flutter --version
- otherwise, keep the current SDK pinned and continue with package updates only
- Inspect package surface:
flutter pub outdated
- identify major updates and likely breaking packages
- Check native dependency managers when iOS or macOS is in scope:
- treat Swift Package Manager as a first-class dependency path, not a fallback
- review Xcode package resolution state and committed package manifests/locks as applicable
- run
xcodebuild -resolvePackageDependencies when SPM-backed native dependencies are present
- if the app still uses CocoaPods, validate the
Podfile/Podfile.lock path separately instead of assuming it is the only Apple dependency source
- Upgrade in small batches:
- prefer targeted updates before full upgrade
- after each batch:
flutter pub get, flutter analyze, impacted tests
- Fix breaking changes:
- address compile and analyzer issues first
- address Apple-platform package resolution failures from SPM or CocoaPods before broad refactors
- update tests to reflect intended behavior changes
- Finalize:
- summarize version deltas
- list breaking changes handled
- provide rollback plan
Guardrails
- Do not mix unrelated refactors.
- Keep every step in a buildable state where possible.
- Do not assume CocoaPods is the source of truth for iOS/macOS dependencies; check SPM-first projects explicitly.
- If failures cascade, split into two PRs:
- Flutter SDK upgrade
- package upgrade and fixes
- Always include before/after version snapshot and explicit rollback trigger.
Required output
- Before/after Flutter version.
- Key dependency changes.
- Native Apple dependency path used (
SPM, CocoaPods, or both) when iOS/macOS is in scope.
- Validation commands run and their result.
- Files changed for compatibility fixes.
- Rollback instructions.
- Known remaining risks after upgrade.