itemKeysOf method

List<K> itemKeysOf(
  1. K sectionKey, {
  2. bool includeExiting = false,
})

Item keys under sectionKey in render order. Excludes pending-deletion items unless includeExiting is true.

Implementation

List<K> itemKeysOf(K sectionKey, {bool includeExiting = false}) {
  _checkNotDisposed();
  final children = includeExiting
      ? _tree.getChildren(SectionKey<K>(sectionKey))
      : _tree.getLiveChildren(SectionKey<K>(sectionKey));
  if (children.isEmpty) {
    return const [];
  }
  return <K>[
    for (final k in children)
      if (_assertIsItem(k)) (k as ItemKey<K>).value,
  ];
}