onPrimary property
Implementation
@override
DynamicColor get onPrimary => DynamicColor(
name: "on_primary",
palette: (scheme) => scheme.primaryPalette,
tone: (scheme) {
if (_isMonochrome(scheme)) {
return scheme.isDark ? 10.0 : 90.0;
}
return scheme.isDark ? 20.0 : 100.0;
},
background: (_) => primary,
contrastCurve: (_) => const ContrastCurve(4.5, 7.0, 11.0, 21.0),
);