platforms constant
Platforms
Current app platforms
When you publish a package, pub.dev automatically detects the platforms that the package supports. If this platform-support list is incorrect, use platforms to explicitly declare which platforms your package supports.
For example, the following platforms entry causes pub.dev to list the package as supporting Android, iOS, Linux, macOS, Web, and Windows:
# This package supports all platforms listed below.
platforms:
android:
ios:
linux:
macos:
web:
windows:
Here is an example of declaring that the package supports only Linux and macOS (and not, for example, Windows):
# This package supports only Linux and macOS.
platforms:
linux:
macos:
Implementation
static const Map<String, Object> platforms = <String, Object>{};