ColorScheme.highContrastDark constructor

const ColorScheme.highContrastDark({
  1. Brightness brightness = Brightness.dark,
  2. Color primary = const Color(0xffefb7ff),
  3. Color onPrimary = Colors.black,
  4. Color? primaryContainer,
  5. Color? onPrimaryContainer,
  6. Color? primaryFixed,
  7. Color? primaryFixedDim,
  8. Color? onPrimaryFixed,
  9. Color? onPrimaryFixedVariant,
  10. Color secondary = const Color(0xff66fff9),
  11. Color onSecondary = Colors.black,
  12. Color? secondaryContainer,
  13. Color? onSecondaryContainer,
  14. Color? secondaryFixed,
  15. Color? secondaryFixedDim,
  16. Color? onSecondaryFixed,
  17. Color? onSecondaryFixedVariant,
  18. Color? tertiary,
  19. Color? onTertiary,
  20. Color? tertiaryContainer,
  21. Color? onTertiaryContainer,
  22. Color? tertiaryFixed,
  23. Color? tertiaryFixedDim,
  24. Color? onTertiaryFixed,
  25. Color? onTertiaryFixedVariant,
  26. Color error = const Color(0xff9b374d),
  27. Color onError = Colors.black,
  28. Color? errorContainer,
  29. Color? onErrorContainer,
  30. Color surface = const Color(0xff121212),
  31. Color onSurface = Colors.white,
  32. Color? surfaceDim,
  33. Color? surfaceBright,
  34. Color? surfaceContainerLowest,
  35. Color? surfaceContainerLow,
  36. Color? surfaceContainer,
  37. Color? surfaceContainerHigh,
  38. Color? surfaceContainerHighest,
  39. Color? onSurfaceVariant,
  40. Color? outline,
  41. Color? outlineVariant,
  42. Color? shadow,
  43. Color? scrim,
  44. Color? inverseSurface,
  45. Color? onInverseSurface,
  46. Color? inversePrimary,
  47. Color? surfaceTint,
  48. @Deprecated('Use surface instead. ' 'This feature was deprecated after v3.18.0-0.1.pre.') Color? background = const Color(0xff121212),
  49. @Deprecated('Use onSurface instead. ' 'This feature was deprecated after v3.18.0-0.1.pre.') Color? onBackground = Colors.white,
  50. @Deprecated('Use surfaceContainerHighest instead. ' 'This feature was deprecated after v3.18.0-0.1.pre.') Color? surfaceVariant,
})

Create a high contrast ColorScheme based on the dark baseline Material 2 color scheme.

This constructor shouldn't be used to update the Material 3 color scheme.

For Material 3, use ColorScheme.fromSeed to create a color scheme from a single seed color based on the Material 3 color system. Override the brightness property of ColorScheme.fromSeed to create a dark color scheme. To create a high-contrast color scheme, set contrastLevel to 1.0.

This example demonstrates how to create a color scheme similar to ColorScheme.highContrastDark using the ColorScheme.fromSeed constructor:
link
colorScheme: ColorScheme.fromSeed(
  seedColor: const Color(0xffefb7ff),
  brightness: Brightness.dark,
).copyWith(
  primaryContainer: const Color(0xffefb7ff),
  onPrimaryContainer: Colors.black,
  secondaryContainer: const Color(0xff66fff9),
  onSecondaryContainer: Colors.black,
  error: const Color(0xff9b374d),
  onError: Colors.white,
),

Implementation

const ColorScheme.highContrastDark({
  this.brightness = Brightness.dark,
  this.primary = const Color(0xffefb7ff),
  this.onPrimary = Colors.black,
  this._primaryContainer,
  this._onPrimaryContainer,
  this._primaryFixed,
  this._primaryFixedDim,
  this._onPrimaryFixed,
  this._onPrimaryFixedVariant,
  this.secondary = const Color(0xff66fff9),
  this.onSecondary = Colors.black,
  this._secondaryContainer,
  this._onSecondaryContainer,
  this._secondaryFixed,
  this._secondaryFixedDim,
  this._onSecondaryFixed,
  this._onSecondaryFixedVariant,
  this._tertiary,
  this._onTertiary,
  this._tertiaryContainer,
  this._onTertiaryContainer,
  this._tertiaryFixed,
  this._tertiaryFixedDim,
  this._onTertiaryFixed,
  this._onTertiaryFixedVariant,
  this.error = const Color(0xff9b374d),
  this.onError = Colors.black,
  this._errorContainer,
  this._onErrorContainer,
  this.surface = const Color(0xff121212),
  this.onSurface = Colors.white,
  this._surfaceDim,
  this._surfaceBright,
  this._surfaceContainerLowest,
  this._surfaceContainerLow,
  this._surfaceContainer,
  this._surfaceContainerHigh,
  this._surfaceContainerHighest,
  this._onSurfaceVariant,
  this._outline,
  this._outlineVariant,
  this._shadow,
  this._scrim,
  this._inverseSurface,
  this._onInverseSurface,
  this._inversePrimary,
  this._surfaceTint,
  @Deprecated(
    'Use surface instead. '
    'This feature was deprecated after v3.18.0-0.1.pre.',
  )
  this._background = const Color(0xff121212),
  @Deprecated(
    'Use onSurface instead. '
    'This feature was deprecated after v3.18.0-0.1.pre.',
  )
  this._onBackground = Colors.white,
  @Deprecated(
    'Use surfaceContainerHighest instead. '
    'This feature was deprecated after v3.18.0-0.1.pre.',
  )
  this._surfaceVariant,
});