最佳答案
这叫做 caret syntax :
Caret syntax provides a more compact way of expressing the most common sort of version constraint.
^version
means "the range of all versions guaranteed to be backwards compatible with the specified version", and follows pub’s convention for semantic versioning.
所以在你的例子中,你有:
- 元:
^1.1.6
- 相当于>=1.1.6 <2.0
- 相等:
^0.2.3
- 相当于>=0.2.3 <0.3.0
- cupertino_icons:
^0.1.2
- 相当于>=0.1.2 <0.2.0
关于dart - 为什么dependencies下的 `pubspec.yaml`文件中有一个^Cap符号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55809719/