collectAllFragments function
Collects all leaf Fragments of the tree in reading order.
Implementation
List<Fragment> collectAllFragments(FNode root) {
final result = <Fragment>[];
walkTree(root, (node, _) {
if (node is Fragment && node is! InlineContainerNode) {
result.add(node);
}
return true;
});
return result;
}