describeEntryText function

String? describeEntryText(
  1. String? text
)

The text fdb describe shows for an interactive entry: its ·-separated parts without empty and icon-only ones (Flutter icon codepoints are in the Unicode private use area U+E000-U+F8FF). Null when nothing is left.

Implementation

String? describeEntryText(String? text) {
  if (text == null) return null;
  final parts = text
      .split(' · ')
      .map((p) => p.trim())
      .where((p) => p.isNotEmpty && p.runes.any((r) => r < 0xE000 || r > 0xF8FF))
      .toList();
  return parts.isEmpty ? null : parts.join(' · ');
}