I was helping to debug a test game app. I had a deep dive in packages. One thing that i am still puzzled about and cannot find proper documentation on stack overflow and official documentation... is the lines of codes that display flutter version: "0.0.0" while it is obviously not.
In pubspec.lock all the packages are properly up-to-date like this one:
dependency: "direct main"
description:
name: audioplayers
url: "https://pub.dartlang.org"
source: hosted
version: "0.14.2"
But is not for flutter
dependency: "direct main"
description: flutter
source: sdk
version: "0.0.0"
...
flutter_test:
dependency: "direct dev"
description: flutter
source: sdk
version: "0.0.0"
flutter_web_plugins:
dependency: transitive
description: flutter
source: sdk
version: "0.0.0"
then at the very bottom of there is
sdks:
dart: ">=2.6.0 <3.0.0"
flutter: ">=1.12.13+hotfix.4 <2.0.0"
Also in pubspec.yaml
Dart is constrained this way
sdk: ">=2.3.0 <3.0.0"
while flutter is not
dependencies:
flutter:
sdk: flutter
Confused
We compared our code to different source code on github and saw similar behaviors. For example: https://github.com/japalekhin/langaw/blob/master/pubspec.lock
https://github.com/fireship-io/183-flutter-draggable-game/blob/master/pubspec.lock
- To fix a version of flutter - can we edit the pubspec.lock line at the bottom? Would that create instability?
- Any documentation, explanations about what is happening under the hood? and why having a version: "0.0.0" in the code?