Would be nice if the package page showed me.
For example https://pub.dartlang.org/packages/fullscreen_mode is Android only, would be nice if pub told me that in a more regular format than a comment from the author.
How would one detect that it is Android-only? The fullscreen_mode package has ios/ directory, and AFAICT the pubspec.yaml doesn't tell us anything about it.
It's one question whether a specific package provides iOS and/or Android specific code. @mit-mit Is there a way to detect this via pubspec.yaml:flutter or via another mechanism? (A simple flutter create foo will automatically create the ios and android folders, so I suspect the presence of these folders doesn't imply the developer actually wrote platform specific code)
It's another question whether a user can depend on a package and assume it will work on both platforms: It depends on the transitive closure of the given package. One could easily imagine a developer publishing a package A containing android-only code and another package B depends on A. So we could declare B as android-only as well. (Though this depends on the specific version of A selected during the pub get).
Maybe it would be better to introduce labels in pubspec.yaml files where developers can just declare on what platforms the package can be used.
There currently is no reliable way of determining this; logged https://github.com/flutter/flutter/issues/10288 on the Flutter side.
Most helpful comment
It's one question whether a specific package provides iOS and/or Android specific code. @mit-mit Is there a way to detect this via
pubspec.yaml:flutteror via another mechanism? (A simpleflutter create foowill automatically create theiosandandroidfolders, so I suspect the presence of these folders doesn't imply the developer actually wrote platform specific code)It's another question whether a user can depend on a package and assume it will work on both platforms: It depends on the transitive closure of the given package. One could easily imagine a developer publishing a package A containing android-only code and another package B depends on A. So we could declare B as android-only as well. (Though this depends on the specific version of A selected during the
pub get).Maybe it would be better to introduce labels in pubspec.yaml files where developers can just declare on what platforms the package can be used.