Closed emme1444 closed 3 years ago
This exposes the current enum value.
This is useful in order to, for example, switch upon the current platform:
import 'package:universal_platform/universal_platform.dart'; void main() { String platformType; switch (UniversalPlatform.value) { case UniversalPlatformType.Web: platformType = "Web"; break; case UniversalPlatformType.Android: case UniversalPlatformType.Fuchsia: case UniversalPlatformType.IOS: platformType = "Mobile"; break; case UniversalPlatformType.Linux: case UniversalPlatformType.MacOS: case UniversalPlatformType.Windows: platformType = "Desktop"; break; } print(platformType); }
If you want me to add the example somehow, please let me know.
Thanks!
This exposes the current enum value.
This is useful in order to, for example, switch upon the current platform:
If you want me to add the example somehow, please let me know.
Thanks!