HostPlatform class
A class that represents a host platform that can run golden tests.
The current platform can be retrieved using HostPlatform.current, and checks against this value are available using isMacOS, isLinux and so on.
- Implemented types
Constructors
- HostPlatform.current()
-
The current host platform.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isLinux → bool
-
Indicates whether this platform is Linux.
no setter
- isMacOS → bool
-
Indicates whether this platform is Apple's macOS.
no setter
- isWindows → bool
-
Indicates whether this platform is Microsoft's Windows.
no setter
- operatingSystem → String
-
The name of the current platform.
no setter
-
props
→ List<
Object?> -
The list of properties that will be used to determine whether
two instances are equal.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stringify → bool?
-
If set to
true
, thetoString
method will be overridden to output this instance'sprops
.no setterinherited
Methods
-
compareTo(
covariant HostPlatform other) → int -
Compares this object to another object.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String - A string representation of this object.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
-
values
→ Set<
HostPlatform> -
Returns all values HostPlatform can represent.
final
Constants
- linux → const HostPlatform
-
The Linux platform (
"Linux"
). - macOS → const HostPlatform
-
The Apple macOS platform (
"macOS"
). - windows → const HostPlatform
-
The Microsoft Windows platform (
"Windows"
).