Skip to content
pubscout

source_maps

0.10.14, released 3 months ago by tools.dart.dev

A Dart library to parse, build, and manipulate source map v3 files.

WASM-ready
$ flutter pub add source_maps
Source repository

What it does

Provides data types, parsers, and builders for working with the source map version 3 specification. It allows tools to read mapping information between generated output and original source code or programmatically generate source maps. It also integrates with source_span for tracking precise file locations and reporting errors.

AI-written summary of version 0.10.14, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You are building compilers, transpilers, or code-generation tools that emit source maps.
  • You need to parse existing source maps to translate generated file locations back to source files.
  • You are building developer tooling that needs to display contextual errors referencing original source positions.

Skip it when

  • You only need to translate stack traces in Dart applications (use source_map_stack_trace instead).
  • General Flutter app development that does not involve compiling or manipulating source code mappings.

Strengths

  • Official Dart team package adhering to the standard source map version 3 specification.
  • Includes both builder and parser capabilities for source maps.
  • Deeply integrates with the standard source_span package for file location tracking.

Weaknesses

  • Low-level utility with minimal usage documentation in the README.
  • Unnecessary for standard client-side Flutter application logic.

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
1

None.

Works with

Packages commonly used together with source_maps: ones it builds on, ones built on it, and its own family.