onPrimary property

DynamicColor onPrimary
getter/setter pair

Implementation

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