What is the caret sign (^) before the dependency version number in Flutter's pubspec.yaml?

前端 未结 3 1182
萌比男神i
萌比男神i 2020-12-10 00:44

In the pubspec.yaml file of my Flutter project there is a caret (^) before the version number of some of the dependencies.

dependen         


        
3条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-10 01:19

    It means that any new versions of a dependency that does not contain breaking changes will be accepted.

    Dart language follows semantic versioning and uses it for package maintainers.

    In layman's terms ^1.8.1 means >= 1.8.1 < 2.0.0

提交回复
热议问题