PlatformType enum

Enum representing various platform types.

The PlatformType enum categorizes the operating systems and environments supported by the application. This is used in conjunction with platform-detection utilities to handle platform-specific logic in a clean and organized manner.

Available Values:

  • Web: Represents web-based environments.
  • Windows: Represents the Windows operating system.
  • Linux: Represents the Linux operating system.
  • MacOS: Represents the macOS operating system.
  • Android: Represents the Android operating system.
  • Fuchsia: Represents the Fuchsia operating system.
  • IOS: Represents the iOS operating system.

Example Usage

PlatformType platform = PlatformType.Android;

switch (platform) {
  case PlatformType.Web:
    print("Running on Web");
    break;
  case PlatformType.Windows:
    print("Running on Windows");
    break;
  case PlatformType.Android:
    print("Running on Android");
    break;
  // Handle other cases...
}
Inheritance
Available extensions

Values

Web → const PlatformType

Represents web-based platforms.

Windows → const PlatformType

Represents the Windows operating system.

Linux → const PlatformType

Represents the Linux operating system.

MacOS → const PlatformType

Represents the macOS operating system.

Android → const PlatformType

Represents the Android operating system.

Fuchsia → const PlatformType

Represents the Fuchsia operating system.

IOS → const PlatformType

Represents the iOS operating system.

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
name String

Available on Enum, provided by the EnumName extension

The name of the enum value.
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

Constants

values → const List<PlatformType>
A constant List of the values in this enum, in order of their declaration.