加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

在dart的依赖版本控制中,加一(1)意味着什么

发布时间:2020-12-14 14:52:40 所属栏目:百科 来源:网络整理
导读:我在一些颤抖的依赖中看到这一点,并且一直想知道这意味着什么,因为我这些天经常看到它. 示例pubspec.yaml dependencies: flutter: sdk: flutter cloud_firestore: ^0.8.1+1 sqflite: 0.12.2+1 zoomable_image: ^1.2.1+1 我检查了here但没找到它. 什么意思?
我在一些颤抖的依赖中看到这一点,并且一直想知道这意味着什么,因为我这些天经常看到它.

示例pubspec.yaml

dependencies:
  flutter:
    sdk: flutter
  cloud_firestore: ^0.8.1+1
  sqflite: 0.12.2+1
  zoomable_image: ^1.2.1+1

我检查了here但没找到它.

什么意思?它也可以是2吗?

解决方法

意味着它是一个常规版本,
而 – 表示预发布版本.
(x.y.z之后没有内部版本号也表示发布版本如此)

该版本的以下部分是一些没有固定格式的内部版本号.

也可以看看

> https://www.dartlang.org/tools/pub/versioning
> https://semver.org/spec/v2.0.0-rc.1.html

从https://semver.org/spec/v2.0.0-rc.1.html开始

  1. A pre-release version MAY be denoted by appending a dash and a series of dot separated identifiers immediately following the patch version. Identifiers MUST be comprised of only ASCII alphanumerics and dash [0-9A-Za-z-]. Pre-release versions satisfy but have a lower precedence than the associated normal version. Examples: 1.0.0-alpha,1.0.0-alpha.1,1.0.0-0.3.7,1.0.0-x.7.z.92.

  2. A build version MAY be denoted by appending a plus sign and a series of dot separated identifiers immediately following the patch version or pre-release version. Identifiers MUST be comprised of only ASCII alphanumerics and dash [0-9A-Za-z-]. Build versions satisfy and have a higher precedence than the associated normal version. Examples: 1.0.0+build.1,1.3.7+build.11.e0f985a.

提示:除非 – 明确是pubspec.yaml中版本约束的一部分,否则flutter包get会忽略预发布版本(带 – )

foo_package: ^1.2.3-beta

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读