keepPrimaryContainer property

bool keepPrimaryContainer
final

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

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

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

Defaults to false.

Implementation

final bool keepPrimaryContainer;