DoubleProperty constructor Null safety

DoubleProperty(
  1. String name,
  2. double? value,
  3. {String? ifNull,
  4. String? unit,
  5. String? tooltip,
  6. Object? defaultValue = kNoDefaultValue,
  7. bool showName = true,
  8. DiagnosticsTreeStyle style = DiagnosticsTreeStyle.singleLine,
  9. DiagnosticLevel level = DiagnosticLevel.info}
)

If specified, unit describes the unit for the value (e.g. px).

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

Implementation

DoubleProperty(
  String name,
  double? value, {
  String? ifNull,
  String? unit,
  String? tooltip,
  Object? defaultValue = kNoDefaultValue,
  bool showName = true,
  DiagnosticsTreeStyle style = DiagnosticsTreeStyle.singleLine,
  DiagnosticLevel level = DiagnosticLevel.info,
}) : assert(showName != null),
     assert(style != null),
     assert(level != null),
     super(
  name,
  value,
  ifNull: ifNull,
  unit: unit,
  tooltip: tooltip,
  defaultValue: defaultValue,
  showName: showName,
  style :style,
  level: level,
);