Existing issue?
What happened?
I’d like to propose a migration away from the now-deprecated APIs in material_color_utilities, specifically:
- CorePalette.fromList
- Scheme.lightFromCorePalette
- Scheme.darkFromCorePalette
These APIs have been replaced in recent versions by:
- CorePalettes
- DynamicScheme (and concrete implementations like SchemeTonalSpot)
Why this migration matters
1️⃣ Deprecated APIs
The current implementation relies on APIs that are officially deprecated upstream. This may lead to:
- Analyzer warnings
- Future breaking changes
- Eventual removal in upcoming versions of material_color_utilities
- Migrating now would future-proof the package.
2️⃣ Alignment with latest Material 3 architecture
The newer API is centered around:
- DynamicScheme
- Variant (TonalSpot, Expressive, Vibrant, etc.)
- Explicit control of contrastLevel
- CorePalettes instead of CorePalette
This reflects the direction Material 3 is moving toward, especially regarding dynamic color harmonization and scheme flexibility.
Relevant log output
When using the latest version of material_color_utilities, the following deprecation warnings are produced:
warning: 'CorePalette.fromList' is deprecated and shouldn't be used.
Use CorePalettes instead. (deprecated_member_use)
warning: 'Scheme.lightFromCorePalette' is deprecated and shouldn't be used.
Use DynamicScheme or a concrete Scheme implementation instead. (deprecated_member_use)
warning: 'Scheme.darkFromCorePalette' is deprecated and shouldn't be used.
Use DynamicScheme or a concrete Scheme implementation instead. (deprecated_member_use)
Existing issue?
What happened?
I’d like to propose a migration away from the now-deprecated APIs in material_color_utilities, specifically:
These APIs have been replaced in recent versions by:
Why this migration matters
1️⃣ Deprecated APIs
The current implementation relies on APIs that are officially deprecated upstream. This may lead to:
2️⃣ Alignment with latest Material 3 architecture
The newer API is centered around:
This reflects the direction Material 3 is moving toward, especially regarding dynamic color harmonization and scheme flexibility.
Relevant log output
When using the latest version of material_color_utilities, the following deprecation warnings are produced: