ObjectFlagProperty<T>.has constructor Null safety

ObjectFlagProperty<T>.has(
  1. String name,
  2. T? value,
  3. {DiagnosticLevel level = DiagnosticLevel.info}
)

Shorthand constructor to describe whether the property has a value.

Only use if prefixing the property name with the word 'has' is a good flag name.

The name and level arguments must not be null.

Implementation

ObjectFlagProperty.has(
  String super.name,
  super.value, {
  super.level,
}) : assert(name != null),
     assert(level != null),
     ifPresent = 'has $name',
     super(
  showName: false,
);