CupertinoDynamicColor.withBrightness 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). The default effective color is color.
All the colors must not be null.
Implementation
const CupertinoDynamicColor.withBrightness({
  String? debugLabel,
  required Color color,
  required Color darkColor,
}) : this(
  debugLabel: debugLabel,
  color: color,
  darkColor: darkColor,
  highContrastColor: color,
  darkHighContrastColor: darkColor,
  elevatedColor: color,
  darkElevatedColor: darkColor,
  highContrastElevatedColor: color,
  darkHighContrastElevatedColor: darkColor,
);