ObjectFlagProperty<T> constructor

ObjectFlagProperty<T>(
  1. String name,
  2. T? value,
  3. {String? ifPresent,
  4. String? ifNull,
  5. bool showName = false,
  6. DiagnosticLevel level = DiagnosticLevel.info}
)

Create a diagnostics property for values that can be present (non-null) or absent (null), but for which the exact value's Object.toString representation is not very transparent (e.g. a callback).

At least one of ifPresent or ifNull must be non-null.

Implementation

ObjectFlagProperty(
  String super.name,
  super.value, {
  this.ifPresent,
  super.ifNull,
  super.showName = false,
  super.level,
}) : assert(ifPresent != null || ifNull != null);