os_type 0.3.0
os_type: ^0.3.0 copied to clipboard
Useful for OS and web environment detection, supports HarmonyOS.
0.3.0 #
- 改为纯 Dart 包,移除 Flutter SDK 依赖
OS.value由TargetPlatform改为String,如macos、ohos,web 环境为web- 移除
initHarmonyDeviceType、MethodChannel、平台接口和 ohos 原生插件 - 鸿蒙设备类型改为同步读取 NDK
OH_GetDeviceType,非鸿蒙或 web 返回'N/A'
0.2.2 #
-
Fixed web plugin registration parameters
-
Updated README
0.2.1 #
- Fixed unused parameter warning in web plugin registration method
- When initializing HarmonyOS device type in web environment or when the initialization result of HarmonyOS device type is null, use log instead of throwing an exception, with a default result of 2in1 to ensure normal operation
0.2.0 #
- Fix plugin registration error
0.1.0 #
- Downgrade SDK version limit
- Add example code to README
- Optimize platform detection logic
0.0.1 #
- Initial release of the os_type plugin
- Support for detecting various operating systems including HarmonyOS
- Added method channel implementation for native platform communication
- Implemented platform interface for cross-platform compatibility
- Added example project demonstrating usage
- Support for detecting PC vs mobile operating systems
- Special handling for HarmonyOS device types initialization
- Optimized platform detection logic