“build-runner”
Source Generation Patterns in Dart: Annotations, Builders, and When to Skip It
Patterns for build and source_gen: annotation-driven generators, consuming .g.dart files, isolating generated APIs, build.yaml tuning, and when to skip codegen.
Dart source_gen Utilities: Generators, LibraryReader, TypeChecker, and build_test
Write and ship a source generator: Generator and GeneratorForAnnotation, ConstantReader, TypeChecker, LibraryReader, buildStep output, build_runner, and tests.
Supercharging Build Runner: Performance Upgrades and Faster Code Generation in 2026
Discover the latest optimizations in Dart build_runner, incremental caching, and how they solve slow code generation in large Flutter projects.
Dart Macros: Compile-Time Code Generation Comes to the Language
Dart macros promised in-language compile-time code generation with deep semantic introspection. The program was paused in January 2025 over hygiene, analyzer integration, and compile-time performance. This post explains what macros were designed to do, why they did not ship, what the 2026 roadmap replaces them with, and how to keep using build_runner today.
Code Generation with build_runner in Dart and Flutter
A practical guide to build_runner: builders, annotations, watch mode, build.yaml configuration, and how to keep generated code fast and out of your way.