Search packages, repositories and app categories

Package detailsv1.4.0

source_helper

Utilities to help with Dart source code generation. Includes utilities for properly generating String literals from any String value.

AndroidiOSmacOSWindowsLinux
30-day downloads
4.7M
Likes
19
Pub points
160

Install package

flutter pub add source_helper

Package Overview

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

source_helper is a Dart package developed by Google that provides utilities for generating Dart source code programmatically. It specializes in safely creating String literals from any String value, ensuring proper escaping and formatting. This is particularly useful in code generation scenarios where correctness and readability are critical. The package supports multiple platforms including Android, iOS, macOS, Windows, and Linux, making it ideal for cross-platform development workflows involving build-time code generation.

Use cases

  • Generating boilerplate code
  • Creating safe string literals in code generation
  • Automating source file creation
  • Building custom code generators
  • Integrating with build_runner

Key features

  • Properly escapes String values
  • Generates valid Dart syntax
  • Supports cross-platform builds
  • Designed for code generation workflows
  • Lightweight and focused

Suitable for

  • Code generation tool developers
  • Build system integrators
  • Dart library authors
  • Compiler plugin creators
  • CI/CD pipeline builders

Considerations

  • Requires integration with build systems
  • Not intended for runtime use
  • Limited to source code generation tasks
  • Depends on correct usage in build steps
  • Best used with build_runner or similar tools

Original README

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

Utilities to help with Dart source code generation.

Pub package Dart package publisher Coverage Status

Contributing

See CONTRIBUTING.md for details.

License

Apache 2.0; see LICENSE for details.

Disclaimer

This project is not an official Google project. It is not supported by Google and Google specifically disclaims all warranties as to its quality, merchantability, or fitness for a particular purpose.

Categories

Dependencies

Dependency list 2 items

Source repository

Projects using this package