onErrorContainer property
Get DynamicColor for onErrorContainer.
Implementation
static DynamicColor onErrorContainer = DynamicColor.fromPalette(
name: 'on_error_container',
palette: (DynamicScheme s) => s.errorPalette,
tone: (DynamicScheme s) {
if (_isMonochrome(s)) {
return s.isDark ? 90 : 10;
}
if (_useExpressiveOnContainers(s)) {
return s.isDark ? 90 : 30;
} else {
return s.isDark ? 90 : 10;
}
},
background: (DynamicScheme s) => MaterialDynamicColors.errorContainer,
contrastCurve: ContrastCurve(3, 4.5, 7, 11),
);