搜尋分類、套件與程式碼儲存庫

套件詳情v3.2.0

platform

一個可插入的、可模擬的 Dart 平台資訊抽象。

AndroidiOSmacOSWindowsLinux
近 30 天下載
1610萬
喜歡數
121
Pub 分數
160

安裝套件

flutter pub add platform

套件介紹

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

該平台套件為 Dart 應用程式提供了一個可插入且可模擬的抽象,用於檢索平台資訊。它讓開發者能夠以一致的方式存取作業系統、架構和環境等詳細資訊,適用於不同平台。透過將平台偵測與直接系統呼叫分離,簡化了測試並提升了程式碼的可維護性。在需要於測試中模擬或驗證特定平台行為的環境中,此套件特別實用。

適用情境

  • 測試平台特定邏輯
  • 在單元測試中模擬平台資料
  • 跨平台應用開發
  • 模擬不同的作業系統環境
  • 確保一致的平台檢測
  • 建構可移植的 Dart 庫

主要特色

  • 可插入的平台實作
  • 可模擬的平台資訊
  • 支援多個平台
  • 關注點的清晰分離
  • 與測試框架的輕鬆整合
  • 跨平台一致的 API

適合對象

  • Dart 開發人員撰寫跨平台應用程式
  • 需要平台模擬的測試工程師
  • 需要平台感知的庫
  • 團隊正在實踐測試驅動開發
  • 針對多個作業系統的開發人員

使用建議

  • 需要為自定義平台實作進行設定
  • 對於簡單使用案例,可能會增加輕微開銷
  • 最佳搭配測試框架使用
  • 不建議用於生產應用中的執行階段平台檢測
  • 僅限基本平台元資料
  • 依賴於 Dart 的核心平台套件

原始 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.

所屬分類

依賴

依賴清單 1 項

原始碼儲存庫

使用此套件的專案

所在榜單