onPrimaryContainer property
Implementation
@override
DynamicColor get onPrimaryContainer => DynamicColor(
name: "on_primary_container",
palette: (scheme) => scheme.primaryPalette,
tone: (scheme) {
if (_isFidelity(scheme)) {
return DynamicColor.foregroundTone(primaryContainer.tone(scheme), 4.5);
}
if (_isMonochrome(scheme)) {
return scheme.isDark ? 0.0 : 100.0;
}
return scheme.isDark ? 90.0 : 30.0;
},
background: (_) => primaryContainer,
contrastCurve: (_) => const ContrastCurve(3.0, 4.5, 7.0, 11.0),
);