DebugIterableProperty<T> constructor

DebugIterableProperty<T>(
  1. String name,
  2. Iterable<T>? value, {
  3. Object? defaultValue = kNoDefaultValue,
  4. String? ifNull,
  5. String? ifEmpty = '[]',
  6. bool showName = true,
  7. bool showSeparator = true,
})

Create a diagnostics property for iterables (e.g. lists).

The ifEmpty argument is used to indicate how an iterable value with 0 elements is displayed. If ifEmpty equals null that indicates that an empty iterable value is not interesting to display similar to how defaultValue is used to indicate that a specific concrete value is not interesting to display.

Implementation

DebugIterableProperty(
  String super.name,
  super.value, {
  super.defaultValue,
  super.ifNull,
  super.ifEmpty = '[]',
  super.showName,
  super.showSeparator,
});