OperatingSystemType enum
Operating system type.
You can get current operating system type with OperatingSystemType.current.
In browsers, the value is determined by using uses browser APIs such as
navigator.userAgent
. If you want to check whether the application is
running in a browser, use isRunningInWeb.
Example
print(OperatingSystemType.current);
Values
- android → const OperatingSystemType
-
Android.
- fuchsia → const OperatingSystemType
-
Fuchsia.
- ios → const OperatingSystemType
-
iOS (iPhone OS, iPad OS, etc.).
- chrome → const OperatingSystemType
-
Chrome OS.
- linux → const OperatingSystemType
- mac → const OperatingSystemType
-
Mac OS X.
- windows → const OperatingSystemType
-
Windows.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- isCupertino → bool
-
Whether this is an operating system designed by Apple (ios,
mac).
no setter
- 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
- current → OperatingSystemType
-
Current operating system type.
final
Constants
-
values
→ const List<
OperatingSystemType> - A constant List of the values in this enum, in order of their declaration.