formatShortcutKeys function

String formatShortcutKeys(
  1. List<String> labels, {
  2. String separator = ' ',
})

Join key labels for display (ctrl+x + b → ctrl+x b).

Implementation

String formatShortcutKeys(List<String> labels, {String separator = ' '}) {
  return labels.where((l) => l.isNotEmpty).join(separator);
}