搜尋套件、儲存庫與 APP 分類

套件詳情v2.0.4

os_detect

平台無關的作業系統檢測。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
42.8萬
喜歡數
44
Pub 分數
150

安裝套件

flutter pub add os_detect

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

os_detect 套件提供了一種與平台無關的方式來檢測正在執行 Dart 應用程式的作業系統。它提供了一個簡單的 API,可在多個平台(包括 Android、iOS、Web、macOS、Windows 和 Linux)上識別目前的作業系統。這讓開發者能夠撰寫跨平台程式碼,根據底層作業系統調整行為,而不需依賴特定於平台的檢查。此套件屬於 Dart 核心函式庫的一部分,確保了可靠性與一致性。非常適合需要作業系統感知邏輯的應用程式,例如檔案路徑處理或使用者介面調整。

適用情境

  • 跨平台應用行為自定義
  • 基於操作系統的檔案路徑格式化
  • 條件性 UI 渲染
  • 系統特定功能檢測
  • 按作業系統除錯和記錄
  • 與原生作業系統功能整合

主要特色

  • 支援所有主要平台
  • 簡單且一致的 API
  • Dart 核心庫的一部分
  • 無外部依賴
  • 準確的作業系統識別
  • 輕量且高效

適合對象

  • 開發跨平台 Flutter 應用的開發者
  • 需要作業系統特定邏輯的應用程式
  • 需要執行時作業系統感知的工具
  • 跨平台實用工具
  • Dart 庫維護者

使用建議

  • 僅限作業系統檢測
  • 不提供詳細的操作系統版本資訊
  • 不適用於底層系統作業
  • 在 Web 環境中需要謹慎處理
  • 無執行時設定選項
  • 取決於 Dart SDK 的可用性

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

Overview

This repository is home to various Dart packages under the dart.dev publisher.

Packages

Package Description Issues Version
args Library for defining parsers for parsing raw command-line arguments into a set of options and values using GNU and POSIX style options. issues pub package
async Utility functions and classes related to the 'dart:async' library. issues pub package
characters String replacement with operations that are Unicode/grapheme cluster aware. issues pub package
collection Collections and utilities functions and classes related to collections. issues pub package
convert Utilities for converting between data representations. Provides a number of Sink, Codec, Decoder, and Encoder types. issues pub package
crypto Implementations of SHA, MD5, and HMAC cryptographic functions. issues pub package
fixnum Library for 32- and 64-bit signed fixed-width integers with consistent behavior between native and JS runtimes. issues pub package
lints Official Dart lint rules. Defines the 'core' and 'recommended' set of lints suggested by the Dart team. issues pub package
logging Provides APIs for debugging and error logging, similar to loggers in other languages, such as the Closure JS Logger and java.util.logging.Logger. issues pub package
os_detect Platform independent OS detection. issues pub package
path A string-based path manipulation library. issues pub package
platform A pluggable, mockable platform information abstraction for Dart. issues pub package
typed_data Utility functions and classes related to the dart:typed_data library. issues pub package

Publishing automation

For information about our publishing automation and release process, see https://github.com/dart-lang/ecosystem/wiki/Publishing-automation.

For additional information about contributing, see our contributing page.

所屬分類

依賴

依賴清單 2 項

原始碼儲存庫

使用此套件的專案