platforms property
What this entry point can actually run on. Everything, when empty.
Some main()s are only meant for one kind of machine: a kiosk build for
tablets, an operator console for the desktop, a web-only embed. Declaring
it turns a wrong device from a build failure minutes later into a device
the picker never offers.
RunPlatform.mobile and RunPlatform.desktop are shorthands and expand, so the coarse case stays one word:
Entrypoint('lib/main_kiosk.dart', name: 'Kiosk',
platforms: [RunPlatform.ios, RunPlatform.android]),
Entrypoint('lib/main_admin.dart', name: 'Admin',
platforms: [RunPlatform.desktop]),
This says what the entry point is for, not what the package can build.
A package with no web/ directory cannot run on Chrome either, and that
is not declared here — it is a fact about the package, and one nothing
should have to write down twice.
Implementation
final List<RunPlatform> platforms;