CupertinoDynamicColor constructor Null safety

const CupertinoDynamicColor(
  1. {String? debugLabel,
  2. required Color color,
  3. required Color darkColor,
  4. required Color highContrastColor,
  5. required Color darkHighContrastColor,
  6. required Color elevatedColor,
  7. required Color darkElevatedColor,
  8. required Color highContrastElevatedColor,
  9. required Color darkHighContrastElevatedColor}
)

Creates an adaptive Color that changes its effective color based on the BuildContext given. The default effective color is color.

All the colors must not be null.

Implementation

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