Version 2.0.0
2.0.0
May 14, 2024
This release adds support for the revised Material-3 ColorScheme
released in Flutter version 3.22.0 and for seeded scheme variants, that will arrive in the Flutter stable release after 3.22.x.
-
CHANGE
- Bring the internal Material Color Utilities (MCU) library version to parity with its latest package release 0.11.1. Flutter SDK stable 3.22 still uses MCU 0.8.0, but the Flutter master channel already uses MCU 0.11.1.
- The
FlexPaletteType.extended
tones got two new tones added, tone 2, and 24. It now has 27 tones.
-
NEW
-
Support revised Material-3
ColorScheme
with the new colorsprimaryFixed
,primaryFixedDim
,onPrimaryFixed
,onPrimaryFixedVariant
,secondaryFixed
,secondaryFixedDim
,onSecondaryFixed
,onSecondaryFixedVariant
,tertiaryFixed
,tertiaryFixedDim
,onTertiaryFixed
,onTertiaryFixedVariant
,surfaceDim
,surfaceBright
,surfaceContainerLowest
,surfaceContainerLow
,surfaceContainer
,surfaceContainerHigh
andsurfaceContainerHighest
. -
New alternative way to specify the used seeding algorithm in
SeedColorScheme.fromSeeds
by providing new enum valueFlexSchemeVariant
to itsvariant
property.- In addition to supporting selection of built-in
FlexTones
, thevariant
property also supports using Flutter SDK, MCU based scheme variantstonalSpot
,monochrome
,neutral
,vibrant
,expressive
,content
,rainbow
andfruitSalad
in by specifying them in propertyvariant
inSeedColorScheme.fromSeeds
. In Flutter 3.22 only the defaulttonalSpot
is available, but with FSS you can use any of the other variants as well already in Flutter 3.22. The other variants are not yet available in Flutter 3.22, but they are available in theColorScheme
API in the master channel and will be available in FlutterColorScheme.fromSeed
in the next stable release after 3.22. With FSS you can use them already starting from Flutter 3.22.0. - With the
variants
enum property you can also select built-inFlexTones
that you could use before inSeedColorScheme.fromSeeds
intones
. TheFlexTones
are still available and can be used as before, it has some advantages. Withtones
you can create customized seed extractions based onFlexTones
and you can use tones surface quick modifiers,onMainsUseBW
,onSurfacesUseBW
andsurfacesUseBW
. - When using
variants
, if the variant is one of the Flutter SDK/MCU variants, it will not use more than one key color, the primary as seed color. TheFlexSchemeVariant
that have their propertyisFlutterScheme
set to true are part of the Flutter SDK/MCU variants. - The Flutter SDK/MCU variants are
tonalSpot
,fidelity
,monochrome
,neutral
,vibrant
,expressive
,content
,rainbow
andfruitSalad
. - The other
FlexSchemeVariant
that have their propertyisFlutterScheme
set to false are part of theFlexTones
variants using the corresponding built-inFlexTones
as seed extraction. The variants arematerial
,material3Legacy
,soft
,vivid
,vividSurfaces
,highContrast
,ultraContrast
,jolly
,vividBackground
,oneHue
,candyPop
andchroma
. Thechroma
option is similar to the new nice SDK/MCU one calledfidelity
, in that it follows chroma of seed color, with the added benefit that it can use a separate seed color for each tonal palette. - The APIs
variant
andtones
are mutually exclusive, you can only use one of them inSeedColorScheme.fromSeeds
. Both can be unspecified, but if you specify one, the other must be unspecified/null.
- In addition to supporting selection of built-in
-
-
A new
FlexTones.material3Legacy
was added. ThisFlexTones
configuration preserves and provides access to the seed generation used by Flutter prior to Flutter version 3.22 and as used byFlexTones.material
in FlexSeedScheme before version 2.0.0. If you in Flutter 3.22 and FlexSeedScheme 2.0.0 need to replicate this style you can use thisFlexTones
inSeedColorScheme.fromSeeds
propertytones
or theFlexSchemeVariant.material3Legacy
invariants
. -
BREAKING
- The Material-3
ColorScheme
colorsbackground
,onBackground
andsurfaceVariant
have been deprecated since they are also deprecated in Flutter 3.22.- These deprecated colors are still supported in
SeedColorScheme.fromSeeds
andFlexTones
, but they will be removed in a future release. They are replaced bysurface
,onSurface
andsurfaceContainerLowest
. There are also many new surface colors, likesurfaceDim
,surfaceBright
andsurfaceContainerLowest
in the new Material-3ColorScheme
in Flutter 3.22. - The fact that these deprecated colors are still referenced in the package will reduce its pub.dev score with 10 points, but they are kept for now to maintain FULL compatibility with Flutter 3.22 that also still provides values for these deprecated colors and uses them in code. This package needs to provide the same values to be fully compatible. The
ColorScheme
colorsbackground
,onBackground
andsurfaceVariant
may only be fully removed when they have been removed from the Flutter SDK stable channel. If later tests show they can be removed without breaking any styles earlier, they will be removed in a future release of this package, even if they are still available in the Flutter SDK stable channel. A future dev version may also remove them to provide compatibility with the Flutter master channel when they are removed there.
- These deprecated colors are still supported in
- The Material-3
-
BREAKING STYLES
-
All built-in
FlexTones
now use thepaletteType
extended viaFlexPaletteType.extended
as default for additional tone fidelity. This is needed for compatibility with Flutter 3.22 and its revisedColorScheme
. -
The default tones for the built-in
FlexTones
have been adjusted to match the new Material-3ColorScheme
in Flutter 3.22. The new tones and default styles are marginally different but also better than in previous Flutter versions. If you need the result and style used in Flutter 3.19 and earlier, you can use theFlexTones.material3Legacy
astones
inSeedColorScheme.fromSeeds
to get the resultFlexTones.material
produced in FSS before version 2.0.0 and that was also the default in Flutter in version 3.19 and earlier. -
The
FlexSchemeVariant.tonalSpot
is thevariant
that Flutter SDK uses from MCU inColorScheme.fromSeed
in Flutter 3.22 and later when you make seed generated color schemes with it. This generated scheme is different from the oneColorScheme.fromSeed
generated in Flutter 3.19 and earlier. If you need the result and style used in Flutter 3.19 and earlier, you can use thematerial3Legacy
astones
orvariant
inSeedColorScheme.fromSeeds
to get the resultFlexTones.material
produced in FSS before version 2.0.0 and that was also the default in Flutter in version 3.19 and earlier when usingColorScheme.fromSeed
. -
The
FlexTones.material
has been updated and now produces the same result astonalSpot
in tests. There may be some edge cases where there are rounding differences. Thematerial
alternative can be used both invariant
andtones
. It provides the advantages overtonalSpot
that since it is aFlexTones
, it can use multiple seed colors and if used intones
, its results can be quick adjusted withonMainsUseBW
,onSurfacesUseBW
andsurfacesUseBW
. ThetonalSpot
is a Flutter SDK/MCU variant and does not support these customizations.
-