英文:
How to add or remove supported platform from a published package on pub.dev for flutter
问题
我已经在 pub.dev 上发布了一个仅支持 Android 初始的包,现在我想要支持其他平台,如 macOS、iOS 和 Web。我不知道在 pubspec.yaml 文件中指定这些平台的位置。
英文:
I have published a package on pub.dev that only supported android initial and now I want to support other platforms such macOs, iOS and Web. I do not see where to specify the platforms in the pubspec.yaml file.
答案1
得分: 0
你可以在这里找到答案:
https://stackoverflow.com/questions/66214066/how-do-i-add-platforms-to-an-existing-flutter-app-project
在你创建平台文件夹后,pub.dev 将显示你的插件支持哪些平台。
英文:
You can find your answer here:
https://stackoverflow.com/questions/66214066/how-do-i-add-platforms-to-an-existing-flutter-app-project
After you create platform folders, pub.dev will display which platforms your plugin supports.
答案2
得分: 0
经过几周的搜索,我终于找到了在 pubspec.yaml 文件中指定平台的文档。
```yaml
# 此包支持下面列出的所有平台。
platforms:
android:
ios:
linux:
macos:
web:
windows:
阅读更多:https://dart.dev/tools/pub/pubspec#platforms
<details>
<summary>英文:</summary>
After few weeks of searching, I finally found the documentation to specify the platforms in the pubspec.yaml file
```yaml
# This package supports all platforms listed below.
platforms:
android:
ios:
linux:
macos:
web:
windows:
read more: https://dart.dev/tools/pub/pubspec#platforms
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论