ColorScheme.dark constructor

const ColorScheme.dark({
  1. Brightness brightness = Brightness.dark,
  2. Color primary = const Color(0xffbb86fc),
  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(0xff03dac6),
  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(0xffcf6679),
  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 the dark color scheme that matches the 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.

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

Implementation

const ColorScheme.dark({
  this.brightness = Brightness.dark,
  this.primary = const Color(0xffbb86fc),
  this.onPrimary = Colors.black,
  Color? primaryContainer,
  Color? onPrimaryContainer,
  Color? primaryFixed,
  Color? primaryFixedDim,
  Color? onPrimaryFixed,
  Color? onPrimaryFixedVariant,
  this.secondary = const Color(0xff03dac6),
  this.onSecondary = Colors.black,
  Color? secondaryContainer,
  Color? onSecondaryContainer,
  Color? secondaryFixed,
  Color? secondaryFixedDim,
  Color? onSecondaryFixed,
  Color? onSecondaryFixedVariant,
  Color? tertiary,
  Color? onTertiary,
  Color? tertiaryContainer,
  Color? onTertiaryContainer,
  Color? tertiaryFixed,
  Color? tertiaryFixedDim,
  Color? onTertiaryFixed,
  Color? onTertiaryFixedVariant,
  this.error = const Color(0xffcf6679),
  this.onError = Colors.black,
  Color? errorContainer,
  Color? onErrorContainer,
  this.surface = const Color(0xff121212),
  this.onSurface = Colors.white,
  Color? surfaceDim,
  Color? surfaceBright,
  Color? surfaceContainerLowest,
  Color? surfaceContainerLow,
  Color? surfaceContainer,
  Color? surfaceContainerHigh,
  Color? surfaceContainerHighest,
  Color? onSurfaceVariant,
  Color? outline,
  Color? outlineVariant,
  Color? shadow,
  Color? scrim,
  Color? inverseSurface,
  Color? onInverseSurface,
  Color? inversePrimary,
  Color? surfaceTint,
  @Deprecated(
    'Use surface instead. '
    'This feature was deprecated after v3.18.0-0.1.pre.'
  )
  Color? background = const Color(0xff121212),
  @Deprecated(
    'Use onSurface instead. '
    'This feature was deprecated after v3.18.0-0.1.pre.'
  )
  Color? onBackground = Colors.white,
  @Deprecated(
    'Use surfaceContainerHighest instead. '
    'This feature was deprecated after v3.18.0-0.1.pre.'
  )
  Color? surfaceVariant,
}) : _primaryContainer = primaryContainer,
     _onPrimaryContainer = onPrimaryContainer,
     _primaryFixed = primaryFixed,
     _primaryFixedDim = primaryFixedDim,
     _onPrimaryFixed = onPrimaryFixed,
     _onPrimaryFixedVariant = onPrimaryFixedVariant,
     _secondaryContainer = secondaryContainer,
     _onSecondaryContainer = onSecondaryContainer,
     _secondaryFixed = secondaryFixed,
     _secondaryFixedDim = secondaryFixedDim,
     _onSecondaryFixed = onSecondaryFixed,
     _onSecondaryFixedVariant = onSecondaryFixedVariant,
     _tertiary = tertiary,
     _onTertiary = onTertiary,
     _tertiaryContainer = tertiaryContainer,
     _onTertiaryContainer = onTertiaryContainer,
     _tertiaryFixed = tertiaryFixed,
     _tertiaryFixedDim = tertiaryFixedDim,
     _onTertiaryFixed = onTertiaryFixed,
     _onTertiaryFixedVariant = onTertiaryFixedVariant,
     _errorContainer = errorContainer,
     _onErrorContainer = onErrorContainer,
     _surfaceDim = surfaceDim,
     _surfaceBright = surfaceBright,
     _surfaceContainerLowest = surfaceContainerLowest,
     _surfaceContainerLow = surfaceContainerLow,
     _surfaceContainer = surfaceContainer,
     _surfaceContainerHigh = surfaceContainerHigh,
     _surfaceContainerHighest = surfaceContainerHighest,
     _onSurfaceVariant = onSurfaceVariant,
     _outline = outline,
     _outlineVariant = outlineVariant,
     _shadow = shadow,
     _scrim = scrim,
     _inverseSurface = inverseSurface,
     _onInverseSurface = onInverseSurface,
     _inversePrimary = inversePrimary,
     _surfaceTint = surfaceTint,
    // DEPRECATED (newest deprecations at the bottom)
    _background = background,
    _onBackground = onBackground,
    _surfaceVariant = surfaceVariant;