如何在pub.dev上为Flutter发布的包中添加或移除支持的平台?

huangapple go评论95阅读模式
英文:

How to add or remove supported platform from a published package on pub.dev for flutter

问题

我已经在 pub.dev 上发布了一个仅支持 Android 初始的包,现在我想要支持其他平台,如 macOS、iOS 和 Web。我不知道在 pubspec.yaml 文件中指定这些平台的位置。

如何在pub.dev上为Flutter发布的包中添加或移除支持的平台?

英文:

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.

如何在pub.dev上为Flutter发布的包中添加或移除支持的平台?

答案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

huangapple
  • 本文由 发表于 2023年7月24日 15:39:15
  • 转载请务必保留本文链接:https://go.coder-hub.com/76752304.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定