CupertinoDynamicColor.withBrightnessAndContrast constructor

const CupertinoDynamicColor.withBrightnessAndContrast({
  1. String? debugLabel,
  2. required Color color,
  3. required Color darkColor,
  4. required Color highContrastColor,
  5. required Color darkHighContrastColor,
})

Creates an adaptive Color that changes its effective color based on the given BuildContext's brightness (from MediaQueryData.platformBrightness or CupertinoThemeData.brightness) and accessibility contrast setting (MediaQueryData.highContrast). The default effective color is color.

Implementation

const CupertinoDynamicColor.withBrightnessAndContrast({
  String? debugLabel,
  required Color color,
  required Color darkColor,
  required Color highContrastColor,
  required Color darkHighContrastColor,
}) : this(
  debugLabel: debugLabel,
  color: color,
  darkColor: darkColor,
  highContrastColor: highContrastColor,
  darkHighContrastColor: darkHighContrastColor,
  elevatedColor: color,
  darkElevatedColor: darkColor,
  highContrastElevatedColor: highContrastColor,
  darkHighContrastElevatedColor: darkHighContrastColor,
);