mirror of
https://github.com/zjs81/meshcore-open.git
synced 2026-07-10 18:47:15 +10:00
Enhance USB functionality by adding request port label management and platform support checks
This commit is contained in:
committed by
just-stuff-tm
parent
ca5784f3f8
commit
781090243c
@@ -33,4 +33,14 @@ class PlatformInfo {
|
||||
|
||||
/// Whether the app is running on a desktop platform (macOS, Windows, or Linux).
|
||||
static bool get isDesktop => isMacOS || isWindows || isLinux;
|
||||
|
||||
/// Whether the current platform supports a native USB serial backend.
|
||||
static bool get supportsNativeUsbSerial => isAndroid || isWindows || isLinux;
|
||||
|
||||
/// Whether the current browser supports the Web Serial backend.
|
||||
static bool get supportsWebSerial => isWeb && isChrome;
|
||||
|
||||
/// Whether USB serial is expected to be available on the current platform.
|
||||
static bool get supportsUsbSerial =>
|
||||
supportsNativeUsbSerial || supportsWebSerial;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user