locate method

({int length, int offset})? locate(
  1. String name
)

Where section name lies in path: what a reader that reads it in place, rather than whole, needs. Null for a name not carried.

Implementation

({int offset, int length})? locate(String name) {
  final ({int offset, int length})? found = _sections[name];
  if (found == null) return null;
  return (offset: _offset + found.offset, length: found.length);
}