EnumProperty<T> constructor Null safety

EnumProperty<T>(
  1. String name,
  2. T? value,
  3. {Object? defaultValue = kNoDefaultValue,
  4. DiagnosticLevel level = DiagnosticLevel.info}
)

Create a diagnostics property that displays an enum.

The level argument must also not be null.

Implementation

EnumProperty(
  String name,
  T? value, {
  Object? defaultValue = kNoDefaultValue,
  DiagnosticLevel level  = DiagnosticLevel.info,
}) : assert(level != null),
     super (
  name,
  value,
  defaultValue: defaultValue,
  level: level,
);