onPrimary property
Get DynamicColor for onPrimary.
Implementation
static DynamicColor onPrimary = DynamicColor.fromPalette(
name: 'on_primary',
palette: (DynamicScheme s) => s.primaryPalette,
tone: (DynamicScheme s) {
if (_isMonochrome(s)) {
return s.isDark ? 10 : 90;
}
return s.isDark ? 20 : 100;
},
background: (DynamicScheme s) => MaterialDynamicColors.primary,
contrastCurve: ContrastCurve(4.5, 7, 11, 21),
);