Runtime class

An enum of all Dart runtimes supported by the test runner.

Constructors

Runtime(String name, String identifier, { bool isDartVM: false, bool isBrowser: false, bool isJS: false, bool isBlink: false, bool isHeadless: false })
const
Runtime.deserialize(Object serialized)
Converts a JSON-safe representation generated by serialize back into a Runtime.
factory

Properties

identifier String
The identifier used to look up the platform.
final
Whether this platform uses the Blink rendering engine.
final
isBrowser bool
Whether this platform is a browser.
final
isChild bool
Returns whether this is a child of another platform.
read-only
isDartVM bool
Whether this platform runs the Dart VM in any capacity.
final
isHeadless bool
Whether this platform has no visible window.
final
isJS bool
Whether this platform runs Dart compiled to JavaScript.
final
name String
The human-friendly name of the platform.
final
parent Runtime
The parent platform that this is based on, or null if there is no parent.
final
root Runtime
Returns the platform this is based on, or this if it's not based on anything. [...]
read-only
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

extend(String name, String identifier) Runtime
Returns a child of this that counts as both this platform's identifier and the new identifier. [...]
serialize() Object
Converts this into a JSON-safe object that can be converted back to a Runtime using new Runtime.deserialize.
toString() String
Returns a string representation of this object.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited

Operators

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

Constants

builtIn → const List<Runtime>
The platforms that are supported by the test runner by default.
const [Runtime.vm, Runtime.chrome, Runtime.phantomJS, Runtime.firefox, Runtime.safari, Runtime.internetExplorer, Runtime.nodeJS]
chrome → const Runtime
Google Chrome.
const Runtime('Chrome', 'chrome', isBrowser: true, isJS: true, isBlink: true)
firefox → const Runtime
Mozilla Firefox.
const Runtime('Firefox', 'firefox', isBrowser: true, isJS: true)
internetExplorer → const Runtime
Microsoft Internet Explorer.
const Runtime('Internet Explorer', 'ie', isBrowser: true, isJS: true)
nodeJS → const Runtime
The command-line Node.js VM.
const Runtime('Node.js', 'node', isJS: true)
phantomJS → const Runtime
PhantomJS.
const Runtime('PhantomJS', 'phantomjs', isBrowser: true, isJS: true, isBlink: true, isHeadless: true)
safari → const Runtime
Apple Safari.
const Runtime('Safari', 'safari', isBrowser: true, isJS: true)
vm → const Runtime
The command-line Dart VM.
const Runtime('VM', 'vm', isDartVM: true)