flattenContainer method

List<(Fragment, int, int)> flattenContainer(
  1. FNode container
)

Returns the flattened fragment list for container with global offsets, using the document cache when available.

Implementation

List<(Fragment, int, int)> flattenContainer(FNode container) {
  _flattenedCache ??= {};
  final cached = _flattenedCache![container.id];
  if (cached != null) return cached;
  final result = flattenFragmentsSimple(container);
  _flattenedCache![container.id] = result;
  return result;
}