better platform check

This commit is contained in:
Hiroshi Horie
2021-12-15 18:44:01 +07:00
parent 3d5e8a7dd8
commit b24fad0f3b
8 changed files with 50 additions and 14 deletions
+11
View File
@@ -0,0 +1,11 @@
import '../platform.dart';
import 'dart:io';
PlatformType lkPlatformImplementation() {
if (Platform.isWindows) return PlatformType.windows;
if (Platform.isFuchsia) return PlatformType.fuchsia;
if (Platform.isMacOS) return PlatformType.macOS;
if (Platform.isLinux) return PlatformType.linux;
if (Platform.isIOS) return PlatformType.iOS;
return PlatformType.android;
}