getPrimaryPalette method

  1. @override
TonalPalette getPrimaryPalette(
  1. TonalPaletteSourceColor sourceColor,
  2. Variant variant,
  3. bool isDark,
  4. double contrastLevel,
  5. Platform platform,
  6. SpecVersion specVersion,
)
override

Implementation

@override
TonalPalette getPrimaryPalette(
  TonalPaletteSourceColor sourceColor,
  Variant variant,
  bool isDark,
  double contrastLevel,
  Platform platform,
  SpecVersion specVersion,
) => switch (variant) {
  .cmf => .fromHueAndChroma(sourceColor.asHct.hue, sourceColor.asHct.chroma),
  _ => super.getPrimaryPalette(
    sourceColor,
    variant,
    isDark,
    contrastLevel,
    platform,
    specVersion,
  ),
};