gpt4 book ai didi

flutter - 如何在 flutter pub 升级时自动更新 pubspec.yaml?

转载 作者:行者123 更新时间:2023-12-05 05:48:04 51 4
gpt4 key购买 nike

来自 npm,我非常不喜欢 Google 在 Flutter 中处理包更新的方式。它不会在 flutter pub upgrade 上更新 pubspec.yaml,它只会更新 pubspec.lock。

为确保 pubspec.yaml 是最新的,我必须运行 flutter pub outdated 并在运行 flutter pub upgrade 之前手动调整 pubspec.yaml。我太懒了,这不好玩,我希望它是自动化的。 flutter pub outdated 的推荐版本应该为我在 pubspec.yaml 中设置。

我该怎么做?

最佳答案

您可以在 pubspec.yaml 中的包名称后使用 Ctrl+Space 来获取最新版本。

you must press Ctrl+Space exactly one space after ' : ' to see the latest version.

cupertino_icons: <click Ctrl+Space here>

关于flutter - 如何在 flutter pub 升级时自动更新 pubspec.yaml?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70875475/

51 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com