toStringShort method Null safety

  1. @override
String toStringShort()
override

A brief description of this object, usually just the runtimeType and the hashCode.

See also:

  • toString, for a detailed description of the object.

Implementation

@override
String toStringShort() {
  return collection == null
      ? 'null'
      : collection!.isNotEmpty
          ? '<' + T.toString() + '>'
          : '<none>';
}