Runtime class Null safety

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

hashCode int
The hash code for this object.
read-onlyinherited
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
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

Methods

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

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

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