FakePlatform class
Provides a mutable implementation of the Platform interface.
- Inheritance
- Available extensions
Constructors
-
FakePlatform({int? numberOfProcessors, String? pathSeparator, String? operatingSystem, String? operatingSystemVersion, String? localHostname, Map<
String, String> ? environment, String? executable, String? resolvedExecutable, Uri? script, List<String> ? executableArguments, String? packageConfig, String? version, bool? stdinSupportsAnsi, bool? stdoutSupportsAnsi, String? localeName}) - Creates a new FakePlatform with the specified properties.
- FakePlatform.fromJson(String json)
-
Creates a new FakePlatform with properties extracted from the encoded
JSON string.
factory
- FakePlatform.fromPlatform(Platform platform)
-
Creates a new FakePlatform with properties whose initial values mirror
the specified
platform
.
Properties
-
environment
→ Map<
String, String> -
The environment for this process.
no setteroverride
- executable → String
-
The path of the executable used to run the script in this isolate.
no setteroverride
-
executableArguments
→ List<
String> -
The flags passed to the executable used to run the script in this
isolate. These are the command-line flags between the executable name
and the script name. Each fetch of
executableArguments
returns a new list containing the flags passed to the executable.no setteroverride - hashCode → int
-
The hash code for this object.
no setterinherited
- isAlma → bool
-
Available on Platform, provided by the PlatformLinuxDistro extension
AlmaLinuxno setter - isAndroid → bool
-
True if the operating system is Android.
no setterinherited
- isArch → bool
-
Available on Platform, provided by the PlatformLinuxDistro extension
Arch Linuxno setter - isBudgie → bool
-
Available on Platform, provided by the PlatformLinuxDesktop extension
Budgieno setter - isCinnamon → bool
-
Available on Platform, provided by the PlatformLinuxDesktop extension
Cinnamonno setter - isDebian → bool
-
Available on Platform, provided by the PlatformLinuxDistro extension
Debianno setter - isDeepin → bool
-
Available on Platform, provided by the PlatformLinuxDesktop extension
Deepinno setter - isEnlightenment → bool
-
Available on Platform, provided by the PlatformLinuxDesktop extension
Enlightenmentno setter - isFedora → bool
-
Available on Platform, provided by the PlatformLinuxDistro extension
Fedorano setter - isFuchsia → bool
-
True if the operating system is Fuchsia
no setterinherited
- isGNOME → bool
-
Available on Platform, provided by the PlatformLinuxDesktop extension
GNOMEno setter - isIOS → bool
-
True if the operating system is iOS.
no setterinherited
- isKDE → bool
-
Available on Platform, provided by the PlatformLinuxDesktop extension
KDEno setter - isLinux → bool
-
True if the operating system is Linux.
no setterinherited
- isLXQt → bool
-
Available on Platform, provided by the PlatformLinuxDesktop extension
LXQtno setter - isMacOS → bool
-
True if the operating system is OS X.
no setterinherited
- isManjaro → bool
-
Available on Platform, provided by the PlatformLinuxDistro extension
Manjarono setter - isMATE → bool
-
Available on Platform, provided by the PlatformLinuxDesktop extension
MATEno setter - isOpenSUSE → bool
-
Available on Platform, provided by the PlatformLinuxDistro extension
openSUSEno setter - isPantheon → bool
-
Available on Platform, provided by the PlatformLinuxDesktop extension
Pantheonno setter - isPopOS → bool
-
Available on Platform, provided by the PlatformLinuxDistro extension
Pop!_OSno setter - isUbuntu → bool
-
Available on Platform, provided by the PlatformLinuxDistro extension
Ubuntuno setter - isUKUI → bool
-
Available on Platform, provided by the PlatformLinuxDesktop extension
UKUIno setter - isUnity → bool
-
Available on Platform, provided by the PlatformLinuxDesktop extension
Unityno setter - isWindows → bool
-
True if the operating system is Windows.
no setterinherited
- isXfce → bool
-
Available on Platform, provided by the PlatformLinuxDesktop extension
Xfceno setter - localeName → String
-
Get the name of the current locale.
no setteroverride
- localHostname → String
-
Get the local hostname for the system.
no setteroverride
- numberOfProcessors → int
-
The number of processors of the machine.
no setteroverride
- operatingSystem → String
-
A string (
linux
,macos
,windows
,android
,ios
, orfuchsia
) representing the operating system.no setteroverride - operatingSystemVersion → String
-
A string representing the version of the operating system or platform.
no setteroverride
- packageConfig ↔ String?
-
The value of the
--packages
flag passed to the executable used to run the script in this isolate. This is the configuration which specifies how Dart packages are looked up.getter/setter pairoverride-getter - pathSeparator → String
-
The path separator used by the operating system to separate
components in file paths.
no setteroverride
- resolvedExecutable → String
-
The path of the executable used to run the script in this
isolate after it has been resolved by the OS.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- script → Uri
-
The absolute URI of the script being run in this
isolate.
no setteroverride
- stdinSupportsAnsi → bool
-
When stdin is connected to a terminal, whether ANSI codes are supported.
no setteroverride
- stdoutSupportsAnsi → bool
-
When stdout is connected to a terminal, whether ANSI codes are supported.
no setteroverride
- version → String
-
The version of the current Dart runtime.
no setteroverride
Methods
-
copyWith(
{int? numberOfProcessors, String? pathSeparator, String? operatingSystem, String? operatingSystemVersion, String? localHostname, Map< String, String> ? environment, String? executable, String? resolvedExecutable, Uri? script, List<String> ? executableArguments, String? packageConfig, String? version, bool? stdinSupportsAnsi, bool? stdoutSupportsAnsi, String? localeName}) → FakePlatform - Creates a new FakePlatform from this one, with some properties replaced by the given properties.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → String -
Returns a JSON-encoded representation of this platform.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited