Version 4.0.0
Version 4.0.0
Nov 22, 2025
The version requires Flutter 3.38.0 or higher.
This release really brings the bundled forked version of the package Material Color Utilities (MCU) to parity with version 0.13.0. Flutter stable 3.38.x still uses MCU 0.11.1. Next version of Flutter, after stable 0.38, will use MCU 0.13.0, see PR 12125.
This FSS release contains a breaking change to match the default for expressive on-container colors in MCU 0.12.0. This is also included in the coming bump to MCU 0.13.0 in Flutter after version 3.38.
BREAKING
- The
SeedColorScheme.fromSeedsparameteruseExpressiveOnContainerColorsnow defaults totrueinstead offalse.- This makes the default behavior of
SeedColorScheme.fromSeedsmatch the default behavior of MCU 0.12.0 and later, where expressive on-container colors are used by default in light mode. - If you want to maintain the previous behavior, you can explicitly set
useExpressiveOnContainerColorstofalsewhen callingSeedColorScheme.fromSeeds. - For more information see https://pub.dev/packages/flex_seed_scheme#expressive-on-container-colors
- This makes the default behavior of
- The
DynamicSchemeparametercustomErrorPalettewas renamed toerrorPaletteto match newly exposed MCU 0.13.0 naming.- Previously MCU did not expose this parameter, it was named customErrorPalette in the FSS fork. Now that MCU exposes it, we rename it to match MCU's naming.
- This is a minor breaking change, you will only hit it if you have used named parameter
customErrorPaletteinDynamicScheme. It is very unlikely to be used directly by end users of this package, as it is a very low-level API and not used by recommended main public APIs directly, but it was a public API, unfortunately. - FlexColorScheme and Themes Playground did not and do not use this API directly, only indirectly via FSS higher APIs.
- Removed already in version 2.0.0 deprecated private
intproperties inFlexSeedScheme._()and same named publicColorparameters inSeedColorScheme.fromSeeds():backgroundonBackgroundsurfaceVariant
- Removed already in version 2.0.0 deprecated public
intproperties inFlexTones(),FlexTones.light()andFlexTones.dark()and same named parameters inFlexTones.copyWith():backgroundToneonBackgroundTonesurfaceVariantTone
CHANGE
- Updated
FlexSchemeVariantand theirconfigDetailsdescriptions to offer better explanations.- As stated in the change policy doc comment for the enum
FlexSchemeVariant, any changes in the property valuesvariantName,description,configDetails,iconandshadeare not considered breaking changes, only patches. - These properties may be used when building UIs that present the different scheme variants. They serve no other purpose. They can also be ignored, you can use the enum values as input to build your own UI for selecting and describing the scheme variants. The values are used in the example app and also in the
FlexColorSchemepackage example apps, like the Themes Playground.
- As stated in the change policy doc comment for the enum
CHORE
- MCU: Use
MathUtils.sanitizeDegreesDoublefor hue calculation in Cam16. (MCU update Nov 19, 2025, not yet in any package version) - MCU: Added the
KeyColoralgorithm and its binary search optimization that was added in MCU 0.11.2. This may improve performance when extracting tonal palettes from seed colors. - MCU: Optimize ARGB and HCT usage in DynamicScheme.
- MCU: A bunch of internal final statics were made const.
TESTS
- Add explicit test for ARGB int representation.
- Improved tests for TonalPalettes.
- Updated test for new
useExpressiveOnContainerColorsdefaulting totrue. - Added loop test for all MCU
DynamicSchemeVariants to ensure they can be created without errors, so that sameDynamicSchemematches results from Flutter'sColorScheme.fromSeedusing correspondingDynamicSchemeVariant. The loop test excludes the variantsDynamicSchemeVariant.fidelity,DynamicSchemeVariant.monochromeandDynamicSchemeVariant.contentthat have their own special tone logic. Previously only the defaultDynamicSchemeVariant.tonalSpotwas tested this way. This test helps us verify that our fork of MCU can match the version of MCU that Flutter uses internally. When Flutter stable changes to use MCU 0.13.0, this test will need to change its flaguseExpressiveOnContainerColorsfromfalsetotrue.