ColorProperty constructor Null safety

ColorProperty(
  1. String name,
  2. Color? value,
  3. {bool showName = true,
  4. Object? defaultValue = kNoDefaultValue,
  5. DiagnosticsTreeStyle style = DiagnosticsTreeStyle.singleLine,
  6. DiagnosticLevel level = DiagnosticLevel.info}
)

Create a diagnostics property for Color.

The showName, style, and level arguments must not be null.

Implementation

ColorProperty(
  String super.name,
  super.value, {
  super.showName,
  super.defaultValue,
  super.style,
  super.level,
}) : assert(showName != null),
     assert(style != null),
     assert(level != null);