Flutter 中 Material Color Utilities 更新
最新版 Material Color Utilities 已套用至 Flutter Material 函式庫。
摘要
#
此版本將 package:material_color_utilities 從
v0.11.1 升級至 0.13.0。
此更新套件包含與 Material 3 Token 更新
對齊的
演算法變更。
演算法變更影響相同的屬性:
onPrimaryContaineronSecondaryContaineronTertiaryContaineronErrorContainer
這些變更將在使用以下方式產生配色方案時反映出來:
ColorScheme.fromSeedColorScheme.fromImageProviderThemeData(colorScheme:..)
遷移指南
#一般而言,我們相信所產生的顏色將更易讀且在視覺上更吸引人,但若您在升級後希望維持先前的顏色,則需要在產生後手動將這些屬性設定為所需的顏色。
時間軸
#
導入版本:3.39.0-1.0.pre-250
穩定版本:3.41
參考資料
#Unless stated otherwise, the documentation on this site reflects Flutter 3.44.0. Page last updated on 2026-06-14. View source or report an issue.