CupertinoDynamicColor.withBrightnessAndContrast constructor Null safety
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
.
All the colors must not be null.
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,
);