DartPlatform class

A supported "platform" for compilation of Dart libraries.

Each "platform" has its own compilation pipeline and builders, and could differ from other platforms in many ways:

  • The core libs that are supported
  • The implementations of the core libs
  • The compilation steps that are required (frontends or backends could be different).

Typically these should correspond to libraries.json files in the SDK.

New platforms should be created with register, and can later be fetched by name using the DartPlatform.byName static method.


hashCode → int
The hash code for this object. [...]
name → String
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited


supportsLibrary(String library) → bool
Returns whether or not library is supported on this platform. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
toString() → String
Returns a string representation of this object.


operator ==(dynamic other) → bool
The equality operator. [...]

Static Methods

byName(String name) DartPlatform
Returns a DartPlatform instance by name. [...]
register(String name, List<String> supportedLibraries) DartPlatform
Registers a new DartPlatform. [...]