mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-18 07:44:26 +01:00
#22 Add switch for run in bg
This commit is contained in:
@@ -9,6 +9,7 @@ enum PlatformType {
|
||||
macos,
|
||||
windows,
|
||||
web,
|
||||
unknown,
|
||||
}
|
||||
|
||||
final _p = () {
|
||||
@@ -30,7 +31,7 @@ final _p = () {
|
||||
if (Platform.isWindows) {
|
||||
return PlatformType.windows;
|
||||
}
|
||||
return PlatformType.web;
|
||||
return PlatformType.unknown;
|
||||
}();
|
||||
|
||||
PlatformType get platform => _p;
|
||||
@@ -41,3 +42,8 @@ bool get isLinux => _p == PlatformType.linux;
|
||||
bool get isMacOS => _p == PlatformType.macos;
|
||||
bool get isWindows => _p == PlatformType.windows;
|
||||
bool get isWeb => _p == PlatformType.web;
|
||||
bool get isMobile => _p == PlatformType.ios || _p == PlatformType.android;
|
||||
bool get isDesktop =>
|
||||
_p == PlatformType.linux ||
|
||||
_p == PlatformType.macos ||
|
||||
_p == PlatformType.windows;
|
||||
|
||||
Reference in New Issue
Block a user