higherContrastFixed method
Returns a new FlexTones instance where the tones for all fixed colors are modified.
This modifier can be applied to any predefined or custom
FlexTones to make a returned instance where the tones for
the fixed colors fixed
, onFixed
, fixedDim
, onFixedVariant
are
set to 92, 6, 84, 12 instead Material-3 designs specified 90, 10, 80, 30.
This gives us an alternative set of fixed colors with more contrast.
NOTE: If some FlexTones modifiers change same properties, the used order in which they are applied matters. The last one applied will be the one that is used.
Implementation
FlexTones higherContrastFixed([bool useHigherContrast = true]) {
// ignore: avoid_returning_this
if (!useHigherContrast) return this;
return copyWith(
primaryFixedTone: 92,
primaryFixedDimTone: 84,
onPrimaryFixedTone: 6,
onPrimaryFixedVariantTone: 12,
//
secondaryFixedTone: 92,
secondaryFixedDimTone: 84,
onSecondaryFixedTone: 6,
onSecondaryFixedVariantTone: 12,
//
tertiaryFixedTone: 92,
tertiaryFixedDimTone: 84,
onTertiaryFixedTone: 6,
onTertiaryFixedVariantTone: 12,
);
}