Platform class

Information about the environment in which the current program is running.

Platform provides information such as the operating system, the hostname of the computer, the value of environment variables, the path to the running program, and other global properties of the program being run.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

environment Map<String, String>
The environment for this process as a map from string key to string value.
no setter
executable String
The path of the executable used to run the script in this isolate.
no setter
executableArguments List<String>
The flags passed to the executable used to run the script in this isolate.
no setter
isAndroid bool
Whether the operating system is a version of Android.
no setter
isDesktop bool
Whether the operating system is a version of Linux, MacOS or Windows.
no setter
isFuchsia bool
Whether the operating system is a version of Fuchsia.
no setter
isIOS bool
Whether the operating system is a version of iOS.
no setter
isLinux bool
Whether the operating system is a version of Linux.
no setter
isMacOS bool
Whether the operating system is a version of macOS.
no setter
isMobile bool
Whether the operating system is a version of Android or iOS.
no setter
isWeb bool
A constant that is true if the application was compiled to run on the web.
no setter
isWindows bool
Whether the operating system is a version of Microsoft Windows.
no setter
localeName String
Get the name of the current locale.
no setter
localHostname String
The local hostname for the system.
no setter
numberOfProcessors int
The number of individual execution units of the machine.
no setter
operatingSystem String
A string representing the operating system or platform.
no setter
operatingSystemVersion String
A string representing the version of the operating system or platform.
no setter
packageConfig String?
The --packages flag passed to the executable used to run the script in this isolate.
no setter
pathSeparator String
The path separator used by the operating system to separate components in file paths.
no setter
resolvedExecutable String
The path of the executable used to run the script in this isolate after it has been resolved by the OS.
no setter
script Uri
The absolute URI of the script being run in this isolate.
no setter
version String
The version of the current Dart runtime.
no setter

Constants

unknownNumberOfPrecessors → const int
Constant value that indicates that numberOfProcessors getter wasn't able to retrieve number of processors of the host machine.
unknownOperatingSystem → const String
Constant value that indicates that operatingSystem getter wasn't able to retrieve operating system of the host machine.
unknownOperatingSystemVersion → const String
Constant value that indicates that operatingSystemVersion getter wasn't able to retrieve operating system version of the host machine.