keepSecondaryContainer property

bool keepSecondaryContainer
final

When using useKeyColors, set keepSecondaryContainer to true, to keep the resulting ColorScheme.secondaryContainer color as defined by effective FlexColorScheme.secondaryContainer input key color, while still letting all other colors derived from input secondary key to be based on colors seeded from it.

This feature is useful if you want to lock the resulting ColorScheme.secondaryContainer to an exact given color value, while using secondary color as input for all other color values derived from secondary key color. Normally when you key colors from secondary, it will override the ColorScheme.secondaryContainer value with a color value from the secondary color generated tonal palette.

With keepSecondaryContainer set to true, it will keep the effective value it has in your FlexColorScheme.

Defaults to false.

Implementation

final bool keepSecondaryContainer;