A multi-platform lightweight tool which helps you check the platform your app is running on.
Android | Web |
---|---|
There are 2 ways to use it.
PlatformX.platform
This will return one of the values of the PlatformEnum
enum.
enum PlatformEnum {
Android,
IOS,
Web,
Windows,
Linux,
MacOS,
Fuchsia,
}
PlatformX.is[Android/IOS/Web/Windows/Linux/MacOS/Fuchsia]
Example:
PlatformX.isLinux
This will return true if you are running on that specific platform, or false otherwise.