Search packages, repositories and app categories

Package detailsv4.3.1

source_gen

Source code generation builders and utilities for the Dart build system

AndroidiOSmacOSWindowsLinux
30-day downloads
7.2M
Likes
191
Pub points
150

Install package

flutter pub add source_gen

Package Overview

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

Source_gen is a Dart package that provides builders and utilities for generating source code during the build process. It integrates with the Dart build system to automate the creation of boilerplate code, such as JSON serialization, dependency injection, and custom code generation. By leveraging annotations, developers can define rules for code generation, reducing manual effort and minimizing errors. It's widely used in conjunction with other packages like json_serializable and built_value to streamline development workflows across multiple platforms.

Use cases

  • Automating JSON serialization
  • Generating dependency injection code
  • Creating boilerplate-free data classes
  • Supporting custom code generation
  • Enabling type-safe APIs
  • Simplifying repetitive coding tasks

Key features

  • Annotation-based code generation
  • Integration with Dart build system
  • Extensible builder architecture
  • Supports multiple output formats
  • Optimized for performance
  • Cross-platform compatibility

Suitable for

  • Dart developers using build system
  • Projects requiring code automation
  • Teams aiming to reduce boilerplate
  • Apps using JSON or model serialization
  • Developers working with code generation tools
  • Large-scale applications with complex code needs

Considerations

  • Requires understanding of build system
  • May increase build time
  • Needs proper configuration
  • Limited runtime debugging
  • Depends on other generator packages
  • Potential for over-generation if misused

Original README

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

source_gen/README.md

Categories

Dependencies

Dependency list 9 items

Source repository

Projects using this package