compactDefinitions property

String compactDefinitions

Returns all definitions bullet pointed if multiple, and returns the single definition if otherwise.

Implementation

String get compactDefinitions {
  if (definitions.length > 1) {
    return definitions
        .map((definition) => '• ${definition.trim()}')
        .join('\n');
  }

  return definitions.join().trim();
}