ColorScheme.dark constructor Null safety

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 secondary = const Color(0xff03dac6),
  7. Color onSecondary = Colors.black,
  8. Color? secondaryContainer,
  9. Color? onSecondaryContainer,
  10. Color? tertiary,
  11. Color? onTertiary,
  12. Color? tertiaryContainer,
  13. Color? onTertiaryContainer,
  14. Color error = const Color(0xffcf6679),
  15. Color onError = Colors.black,
  16. Color? errorContainer,
  17. Color? onErrorContainer,
  18. Color background = const Color(0xff121212),
  19. Color onBackground = Colors.white,
  20. Color surface = const Color(0xff121212),
  21. Color onSurface = Colors.white,
  22. Color? surfaceVariant,
  23. Color? onSurfaceVariant,
  24. Color? outline,
  25. Color? shadow,
  26. Color? inverseSurface,
  27. Color? onInverseSurface,
  28. Color? inversePrimary,
  29. Color? surfaceTint,
  30. @Deprecated('Use primary or primaryContainer instead. ' 'This feature was deprecated after v2.6.0-0.0.pre.') Color? primaryVariant = const Color(0xff3700B3),
  31. @Deprecated('Use secondary or secondaryContainer instead. ' 'This feature was deprecated after v2.6.0-0.0.pre.') Color? secondaryVariant = const Color(0xff03dac6)}
)

Create the recommended dark color scheme that matches the baseline Material color scheme.

Implementation

const ColorScheme.dark({
  this.brightness = Brightness.dark,
  this.primary = const Color(0xffbb86fc),
  this.onPrimary = Colors.black,
  Color? primaryContainer,
  Color? onPrimaryContainer,
  this.secondary = const Color(0xff03dac6),
  this.onSecondary = Colors.black,
  Color? secondaryContainer,
  Color? onSecondaryContainer,
  Color? tertiary,
  Color? onTertiary,
  Color? tertiaryContainer,
  Color? onTertiaryContainer,
  this.error = const Color(0xffcf6679),
  this.onError = Colors.black,
  Color? errorContainer,
  Color? onErrorContainer,
  this.background = const Color(0xff121212),
  this.onBackground = Colors.white,
  this.surface = const Color(0xff121212),
  this.onSurface = Colors.white,
  Color? surfaceVariant,
  Color? onSurfaceVariant,
  Color? outline,
  Color? shadow,
  Color? inverseSurface,
  Color? onInverseSurface,
  Color? inversePrimary,
  Color? surfaceTint,
  @Deprecated(
    'Use primary or primaryContainer instead. '
    'This feature was deprecated after v2.6.0-0.0.pre.'
  )
  Color? primaryVariant = const Color(0xff3700B3),
  @Deprecated(
    'Use secondary or secondaryContainer instead. '
    'This feature was deprecated after v2.6.0-0.0.pre.'
  )
  Color? secondaryVariant = const Color(0xff03dac6),
}) : assert(brightness != null),
     assert(primary != null),
     assert(onPrimary != null),
     assert(secondary != null),
     assert(onSecondary != null),
     assert(error != null),
     assert(onError != null),
     assert(background != null),
     assert(onBackground != null),
     assert(surface != null),
     assert(onSurface != null),
     _primaryContainer = primaryContainer,
     _onPrimaryContainer = onPrimaryContainer,
     _secondaryContainer = secondaryContainer,
     _onSecondaryContainer = onSecondaryContainer,
     _tertiary = tertiary,
     _onTertiary = onTertiary,
     _tertiaryContainer = tertiaryContainer,
     _onTertiaryContainer = onTertiaryContainer,
     _errorContainer = errorContainer,
     _onErrorContainer = onErrorContainer,
     _surfaceVariant = surfaceVariant,
     _onSurfaceVariant = onSurfaceVariant,
     _outline = outline,
     _shadow = shadow,
     _inverseSurface = inverseSurface,
     _onInverseSurface = onInverseSurface,
     _inversePrimary = inversePrimary,
     _primaryVariant = primaryVariant,
     _secondaryVariant = secondaryVariant,
     _surfaceTint = surfaceTint;