dart - 为什么dependencies下的 `pubspec.yaml`文件中有一个^Cap符号

标签 dart flutter

我不确定为什么在 dependencies 下的 pubspec.yaml 文件中有一个大写符号。见下图。

enter image description here

即使没有上限符号,该项目也能正常运行。

最佳答案

这叫做 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/

相关文章:

flutter - 为什么 flutter 开关onChanged回调会触发错误?

windows - 错误 : Flutter plugin not installed; this adds Flutter specific functionality

csv - Dart CSV 写作

html - 如何修复 HTML-<ul> 列表在 flutter 中显示长列表项?

flutter - 配置单元registerAdapter不接受ID

function - Dart:从函数访问调用者实例

android - 在 Flutter 中合并/合并两个 InputDecoration 实例

Flutter - 在某个字符后删除字符串?

firebase - 如何在 map() 中使用异步代码(Flutter、Firestore)

flutter - 以最大宽度/高度展开?