paletteType property

FlexPaletteType paletteType
final

Defines what FlexPaletteType this FlexTones uses.

The default is FlexPaletteType.extended with 26 tones or optionally use the legacy FlexPaletteType.common with 15 tones.

To make color schemes with new Material3 mappings for light and dark surface colors, using the extended tone set is needed.

In Flutter 3.19 and earlier the ColorScheme surface colors that need the new tones are not yet available. In Flutter 3.22 and later the new surface colors are available and the new tones are used. Due to this the FlexPaletteType.extended is now the new default. The FlexPaletteType.common may even be considered deprecated in the future, but is kept around for backwards code compatibility for a while.

The added tones 4, 6, 12, 17, 22, 24 are for new dark mode surfaces in revised Material 3 dark surface colors. Likewise added tones 96, 94, 92, 87 are for light mode surfaces in the updated Material 3 color system. For more information, see: https://m3.material.io/styles/color/the-color-system/color-roles The additional tones in the Material 3 specification appeared during later part of first half of 2023, and in Flutter 3.22.

Implementation

final FlexPaletteType paletteType;