span property

FileSpan span

Creates the span covered by all of the entities in this iterable.

Implementation

FileSpan get span {
  if (isEmpty) {
    throw ArgumentError.value(this, 'this', 'Was empty');
  }

  final firstSpan = first.span;
  return skip(1).fold(
    firstSpan!,
    (previousValue, entity) => previousValue.expand(entity.span!),
  );
}