Search packages, repositories and app categories

Package detailsv2.17.1

build_runner

A build system for Dart code generation and modular compilation.

macOSWindowsLinux
30-day downloads
7.7M
Likes
2.4K
Pub points
160

Install package

flutter pub add build_runner

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

Build_runner is a Dart build system designed to automate code generation and modular compilation. It integrates with the Dart ecosystem to execute builders that generate code based on annotations, configuration files, or other inputs. By leveraging a declarative configuration model, it enables efficient, incremental builds and supports a wide range of use cases including JSON serialization, dependency injection, and custom code generation. It is particularly useful in large-scale projects where maintaining generated code manually would be error-prone and time-consuming.

Use cases

  • Automated code generation
  • JSON serialization
  • Dependency injection setup
  • Custom builder integration
  • Incremental compilation

Key features

  • Declarative build configuration
  • Support for multiple builders
  • Incremental build execution
  • Extensible plugin architecture
  • Integration with pub package manager

Suitable for

  • Large Dart projects
  • Code generation workflows
  • Team development environments
  • CI/CD pipelines
  • Developers using annotations for code generation

Considerations

  • Requires understanding of build configurations
  • May increase initial setup complexity
  • Performance depends on builder efficiency
  • Not suitable for simple one-off scripts
  • Needs proper dependency management

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

Questions? Suggestions? Found a bug? Please file an issue or start a discussion.

Code generation for Flutter and Dart packages.

See the build_runner package documentation for how to use build_runner builders in your package to add serialization, data classes, data binding, dependency injection, mocking and more.

See the build package documentation to create your own builder.

This repo also hosts the following builders and packages for use by builders.

Categories

Dependencies

Dependency list 30 items

Source repository

Projects using this package

Rankings