ColorScheme.dark constructor Null safety

const ColorScheme.dark(
  1. {Color primary,
  2. Color primaryVariant,
  3. Color secondary,
  4. Color secondaryVariant,
  5. Color surface,
  6. Color background,
  7. Color error,
  8. Color onPrimary,
  9. Color onSecondary,
  10. Color onSurface,
  11. Color onBackground,
  12. Color onError,
  13. Brightness brightness}
)

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

Implementation

const ColorScheme.dark({
  this.primary = const Color(0xffbb86fc),
  this.primaryVariant = const Color(0xff3700B3),
  this.secondary = const Color(0xff03dac6),
  this.secondaryVariant = const Color(0xff03dac6),
  this.surface = const Color(0xff121212),
  this.background = const Color(0xff121212),
  this.error = const Color(0xffcf6679),
  this.onPrimary = Colors.black,
  this.onSecondary = Colors.black,
  this.onSurface = Colors.white,
  this.onBackground = Colors.white,
  this.onError = Colors.black,
  this.brightness = Brightness.dark,
}) : assert(primary != null),
     assert(primaryVariant != null),
     assert(secondary != null),
     assert(secondaryVariant != null),
     assert(surface != null),
     assert(background != null),
     assert(error != null),
     assert(onPrimary != null),
     assert(onSecondary != null),
     assert(onSurface != null),
     assert(onBackground != null),
     assert(onError != null),
     assert(brightness != null);