text property

String get text

The line wayfinder search prints after Notice: and lists under notices in its JSON: message, after its code and a colon for refresh-in-progress and source-changed, as the command has always printed them, and after the bundle's name and a colon when it has one.

Implementation

String get text {
  final line = switch (code) {
    KnowledgeNoticeCode.refreshInProgress ||
    KnowledgeNoticeCode.sourceChanged => '${code.wireValue}: $message',
    KnowledgeNoticeCode.unresolvedRelationship ||
    KnowledgeNoticeCode.unresolvedSource ||
    KnowledgeNoticeCode.governingSourceUnavailable => message,
  };
  return switch (bundle) {
    final bundle? => '${bundle.name}: $line',
    null => line,
  };
}