Updating dependencies in Flutter
Loïc Sharma edited this page Mar 8, 2024
·
3 revisions
Instead of manually updating dependencies in a pubspec.yaml
file, use the update-packages
CLI tool:
flutter update-packages --force-upgrade
Sometimes you need to prevent a dependency from being updated when you run flutter update-packages --force-upgrade
.
In that case, first pin the dependency in kManuallyPinnedDependencies
and a include a comment with a link to an issue to unpin the dependency.
You can then re-run flutter update-packages --force-upgrade
.
Sometimes you need to update a single dependency as a cherrypick to a release candidate branch.
In that case, you can run:
flutter update-packages --cherry-pick-package=[pub package name] --cherry-pick-version='[pub package version]'
- Home of the Wiki
- Roadmap
- API Reference (stable)
- API Reference (main)
- Glossary
- Contributor Guide
- Chat on Discord
- Design documents
- Code of Conduct
- Issue triage reports (latest)
- Our Values
- Tree hygiene
- Issue hygiene and Triage
- Style guide for Flutter repo
- Project teams
- Contributor access
- What should I work on?
- Popular issues
- Running and writing tests
- Release process
- Flutter Framework Gardener Rotation
- Rolling Dart
- Manual Engine Roll with Breaking Commits
- Updating Material Design Fonts & Icons
- Postmortems and Retrospectives
- Hotfix Documentation Best Practices
- In case of emergency
- Landing Changes With Autosubmit
- Setting up the Framework development environment
- The Framework architecture
- API Docs code block generation
- Running examples
- Using the Dart analyzer
- The flutter run variants
- Test coverage for package:flutter
- Writing a golden-file test for package:flutter
- Managing template image assets
- Setting up the Engine development environment
- Compiling the engine
- Debugging the engine
- Using Sanitizers with the Flutter Engine
- Testing the engine
- The Engine architecture
- Flutter's modes
- Crashes
- more...
- Setting up the Packages development environment
- Plugins and Packages repository structure
- Contributing to Plugins and Packages
- Understanding Packages tests
- Plugin Tests
- Releasing a Plugin or Package
- more...