collectLeavesInRange static method
Collects leaf fragments within the selection range of node,
skipping FluentImage leaves.
Implementation
static List<Fragment> collectLeavesInRange(SelectedNode node) {
final leaves = collectLeafFragments(node.container as FNode);
final result = <Fragment>[];
bool inRange = false;
for (final leaf in leaves) {
if (leaf.id == node.startFragment.id) inRange = true;
if (inRange && leaf is! FluentImage) result.add(leaf);
if (leaf.id == node.endFragment.id) inRange = false;
}
return result;
}