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

dynamic_color 封面
套件詳情v2.1.0

dynamic_color

一個 Flutter 套件,可根據平台的動態色彩實作建立 Material 色彩方案。

AndroidmacOSWindowsLinux
近 30 天下載
27.4萬
喜歡數
638
Pub 分數
150

安裝套件

flutter pub add dynamic_color

套件介紹

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

dynamic_color 套件讓 Flutter 應用程式能夠產生適應平台動態色彩實作(例如 Android 的動態色彩或 macOS 的系統外觀)的 Material 顏色方案。它透過利用系統層級的色彩偏好,在淺色與深色模式之間確保一致且視覺上協調的主題。此套件透過根據使用者設定自動調整色彩,簡化主題建立,提升可存取性與使用者體驗。它與 Flutter 的主題系統無縫整合,並支援多個平台,包括 Android、macOS、Windows 與 Linux。

適用情境

  • 跨平台應用中的自適應主題
  • 實現系統驅動的亮色和暗色模式
  • 使用動態顏色方案創建可訪問的使用者介面
  • 透過平台設計指南增強視覺一致性
  • 基於用戶偏好主題產生自動化

主要特色

  • 從動態顏色來源產生材質色彩方案
  • 支援 Android、macOS、Windows 和 Linux
  • 與 Flutter 的 ThemeData 系統整合
  • 自動適應系統外觀
  • 啟用淺色和深色模式之間的平滑過渡

適合對象

  • 開發平台原生 Flutter 應用的開發者
  • 注重可訪問性和使用者體驗的團隊
  • 需要自動主題適配的應用程式
  • 使用 Material Design 3 的項目
  • 跨平台應用程式,針對現代作業系統功能

使用建議

  • 需要 Flutter SDK 3.7 或更高版本
  • 可能需要為自定主題進行額外設定
  • 依賴於平台特定的動態顏色 API
  • 不相容較舊的 Flutter 版本
  • 在沒有更深入主題整合的情況下,自訂功能有限

原始 README

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

Material Design pub packages

This repo contains the source code for packages originally developed by the Material Flutter team.

Package Pub Issues Pull requests Example
dynamic_color pub package GitHub issues by-label GitHub pull requests by-label Example
dynamic_color_testing pub package

Issues

Please file bug reports and suggest enhancements here.

Contributing

If you wish to contribute a change to any of the existing packages in this repo, please review our contribution guide.

If you wish to contribute a new package to the Flutter ecosystem, please see the documentation for developing packages.

Publishing

dart pub publish from the root directory of a package, for admins of the publisher material.io.

Other Material Design packages

The following packages' source code exists in other repositories.

Package Pub Issues Pull requests
animations pub package GitHub issues by-label GitHub pull requests by-label
google_fonts pub package GitHub issues by-label GitHub pull requests by-label
material_color_utilities pub package GitHub issues GitHub pull requests
material_symbols_icons pub package GitHub issues GitHub pull requests

所屬分類

依賴

依賴清單 2 項

原始碼儲存庫

使用此套件的專案