ColorScheme.light constructor Null safety

const ColorScheme.light(
  1. {Brightness brightness = Brightness.light,
  2. Color primary = const Color(0xff6200ee),
  3. Color onPrimary = Colors.white,
  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(0xffb00020),
  15. Color onError = Colors.white,
  16. Color? errorContainer,
  17. Color? onErrorContainer,
  18. Color background = Colors.white,
  19. Color onBackground = Colors.black,
  20. Color surface = Colors.white,
  21. Color onSurface = Colors.black,
  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(0xff018786)}
)

Create a ColorScheme based on a purple primary color that matches the baseline Material color scheme.

Implementation

const ColorScheme.light({
  this.brightness = Brightness.light,
  this.primary = const Color(0xff6200ee),
  this.onPrimary = Colors.white,
  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(0xffb00020),
  this.onError = Colors.white,
  Color? errorContainer,
  Color? onErrorContainer,
  this.background = Colors.white,
  this.onBackground = Colors.black,
  this.surface = Colors.white,
  this.onSurface = Colors.black,
  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(0xff018786),
}) : 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;