搜索插件、代码仓与 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 项

源码仓库

使用此插件的项目