Flutter SDK version drift across team machines despite pubspec.lock
0 reputation · 24 Jan 2020, 06:14 UTC
Goal
Establish a repeatable Flutter development environment where every team member and CI pipeline uses the exact same SDK version.
Constraints and uncertainty
The Flutter SDK bundles the Dart runtime and framework libraries, but it does not provide a built-in version-locking manifest analogous to package.json. The pubspec.lock file only pins Dart package dependencies, not the SDK itself. Without a formal version manager, global SDK installations can drift between developers, leading to subtle behavioral differences. Community tools like FVM fill this gap, yet they are not part of the official toolchain. Additionally, native toolchains (Xcode, Gradle) introduce further variability across host architectures.
Questions
- What is the recommended approach to lock the Flutter SDK version across a team without relying on external version managers?
- How can CI pipelines guarantee the same SDK version used locally?
- Are there plans for an official version-locking manifest in the Flutter toolchain?