continuations property

List<ShortcutContinuation> get continuations

Continuation steps for which-key (next key only).

Implementation

List<ShortcutContinuation> get continuations {
  final depth = matchedKeys.length;
  final out = <ShortcutContinuation>[];
  final seen = <String>{};
  for (final b in candidates) {
    if (b.keys.length <= depth) continue;
    final next = b.labels[depth];
    if (!seen.add('${b.id}:$next')) continue;
    out.add(
      ShortcutContinuation(
        keyLabel: next,
        description: b.description,
        group: b.group,
        actionId: b.id,
        binding: b,
      ),
    );
  }
  return out;
}