CINXE.COM

source_gen | Dart package

<!DOCTYPE html> <html lang="en-us"><head><script src="https://www.googletagmanager.com/gtm.js?id=GTM-MX6DBN9" async="async"></script><script src="/static/hash-o6oemknr/js/gtm.js" async="async"></script><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="ie=edge"/><meta name="viewport" content="width=device-width, initial-scale=1"/><meta name="twitter:card" content="summary"/><meta name="twitter:site" content="@dart_lang"/><meta name="twitter:description" content="Source code generation builders and utilities for the Dart build system"/><meta name="twitter:image" content="https://pub.dev/static/hash-o6oemknr/img/pub-dev-icon-cover-image.png"/><meta property="og:type" content="website"/><meta property="og:site_name" content="Dart packages"/><meta property="og:title" content="source_gen | Dart package"/><meta property="og:description" content="Source code generation builders and utilities for the Dart build system"/><meta property="og:image" content="https://pub.dev/static/hash-o6oemknr/img/pub-dev-icon-cover-image.png"/><meta property="og:url" content="https://pub.dev/packages/source_gen"/><title>source_gen | Dart package</title><link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Google+Sans:wght@400;500;700&amp;family=Google+Sans+Display:wght@400&amp;family=Google+Sans+Text:wght@400;500;700&amp;family=Google+Sans+Mono:wght@400;700&amp;display=swap"/><link rel="shortcut icon" href="/favicon.ico?hash=nk4nss8c7444fg0chird9erqef2vkhb8"/><link rel="stylesheet" href="https://www.gstatic.com/glue/v25_0/ccb.min.css"/><link rel="search" type="application/opensearchdescription+xml" title="Dart packages" href="/osd.xml"/><link rel="canonical" href="https://pub.dev/packages/source_gen"/><meta name="description" content="Source code generation builders and utilities for the Dart build system"/><link rel="alternate" type="application/atom+xml" title="Updated Packages Feed for Pub" href="/feed.atom"/><link rel="stylesheet" type="text/css" href="/static/hash-o6oemknr/material/bundle/styles.css"/><link rel="stylesheet" type="text/css" href="/static/hash-o6oemknr/css/style.css"/><script src="/static/hash-o6oemknr/material/bundle/script.min.js" defer="defer"></script><script src="/static/hash-o6oemknr/js/script.dart.js" defer="defer"></script><script src="https://www.gstatic.com/brandstudio/kato/cookie_choice_component/cookie_consent_bar.v3.js" defer="defer" data-autoload-cookie-consent-bar="true"></script><meta name="pub-page-data" content="eyJwa2dEYXRhIjp7InBhY2thZ2UiOiJzb3VyY2VfZ2VuIiwidmVyc2lvbiI6IjEuNS4wIiwibGlrZXMiOjE1NSwicHVibGlzaGVySWQiOiJ0b29scy5kYXJ0LmRldiIsImlzRGlzY29udGludWVkIjpmYWxzZSwiaXNMYXRlc3QiOnRydWV9LCJzZXNzaW9uQXdhcmUiOmZhbHNlfQ=="/><link rel="preload" href="/static/hash-o6oemknr/highlight/highlight-with-init.js" as="script"/></head><body class="light-theme"><script src="/static/hash-o6oemknr/js/dark-init.js"></script><noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-MX6DBN9" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript><div class="site-header"><button class="hamburger" aria-label="menu toggle"></button><a class="logo" href="/"><img class="site-logo" src="/static/hash-o6oemknr/img/pub-dev-logo.svg" alt="" width="140" height="30" role="presentation"/></a><div class="site-header-space"></div><div class="site-header-mask"></div><div class="site-header-search"><form action="/packages" method="GET"><input class="site-header-search-input" name="q" placeholder="New search..." autocomplete="on" title="Search"/></form></div><nav class="site-header-nav scroll-container"><div class="nav-login-container"><button id="-account-login" class="nav-main-button link">Sign in</button></div><div class="nav-container nav-help-container hoverable"><button class="nav-main-button">Help</button><div class="nav-hover-popup"><div class="nav-table-columns"><div class="nav-table-column"><h3>Pub.dev</h3><a class="nav-link" href="/help/search" rel="noopener" target="_blank">Searching for packages</a><a class="nav-link" href="/help/scoring" rel="noopener" target="_blank">Package scoring and pub points</a></div><div class="nav-table-column"><h3>Flutter</h3><a class="nav-link" href="https://flutter.dev/using-packages/" rel="noopener" target="_blank">Using packages</a><a class="nav-link" href="https://flutter.dev/developing-packages/" rel="noopener" target="_blank">Developing packages and plugins</a><a class="nav-link" href="https://dart.dev/tools/pub/publishing" rel="noopener" target="_blank">Publishing a package</a></div><div class="nav-table-column"><h3>Dart</h3><a class="nav-link" href="https://dart.dev/guides/packages" rel="noopener" target="_blank">Using packages</a><a class="nav-link" href="https://dart.dev/tools/pub/publishing" rel="noopener" target="_blank">Publishing a package</a></div></div></div></div><div class="nav-container nav-help-container-mobile foldable"><h3 class="foldable-button">Pub.dev <img class="foldable-icon" src="/static/hash-o6oemknr/img/nav-mobile-foldable-icon.svg" alt="toggle folding of the section" width="13" height="6"/></h3><div class="foldable-content"><a class="nav-link" href="/help/search" rel="noopener" target="_blank">Searching for packages</a><a class="nav-link" href="/help/scoring" rel="noopener" target="_blank">Package scoring and pub points</a></div></div><div class="nav-container nav-help-container-mobile foldable"><h3 class="foldable-button">Flutter <img class="foldable-icon" src="/static/hash-o6oemknr/img/nav-mobile-foldable-icon.svg" alt="toggle folding of the section" width="13" height="6"/></h3><div class="foldable-content"><a class="nav-link" href="https://flutter.dev/using-packages/" rel="noopener" target="_blank">Using packages</a><a class="nav-link" href="https://flutter.dev/developing-packages/" rel="noopener" target="_blank">Developing packages and plugins</a><a class="nav-link" href="https://dart.dev/tools/pub/publishing" rel="noopener" target="_blank">Publishing a package</a></div></div><div class="nav-container nav-help-container-mobile foldable"><h3 class="foldable-button">Dart <img class="foldable-icon" src="/static/hash-o6oemknr/img/nav-mobile-foldable-icon.svg" alt="toggle folding of the section" width="13" height="6"/></h3><div class="foldable-content"><a class="nav-link" href="https://dart.dev/guides/packages" rel="noopener" target="_blank">Using packages</a><a class="nav-link" href="https://dart.dev/tools/pub/publishing" rel="noopener" target="_blank">Publishing a package</a></div></div></nav></div><div id="banner-container"></div><main class="container"><div class="detail-wrapper -active -has-info-box"><div class="detail-header -is-loose"><div class="detail-container"><div class="detail-header-outer-block"><div class="detail-header-content-block"><h1 class="title">source_gen 1.5.0 <span class="pkg-page-title-copy"><img class="pkg-page-title-copy-icon filter-invert-on-dark" src="/static/hash-o6oemknr/img/content-copy-icon.svg" alt="copy &quot;source_gen: ^1.5.0&quot; to clipboard" width="18" height="18" title="Copy &quot;source_gen: ^1.5.0&quot; to clipboard" data-copy-content="source_gen: ^1.5.0" data-ga-click-event="copy-package-version"/><div class="pkg-page-title-copy-feedback"><span class="code">source_gen: ^1.5.0</span> copied to clipboard</div></span></h1><div class="metadata">Published <span><a class="-x-ago" href="" title="Dec 13, 2023" aria-label="11 months ago" aria-role="button" role="button" data-timestamp="1702507991649">11 months ago</a></span> • <a class="-pub-publisher" href="/publishers/tools.dart.dev"><img class="-pub-publisher-shield filter-invert-on-dark" src="/static/hash-o6oemknr/img/material-icon-verified.svg" alt="verified publisher" width="14" height="14" title="Published by a pub.dev verified publisher"/>tools.dart.dev</a><span class="package-badge" title="Package is compatible with Dart 3.">Dart 3 compatible</span></div><div class="detail-tags-and-like"><div class="detail-tags"><div class="-pub-tag-badge"><span class="tag-badge-main">SDK</span><a class="tag-badge-sub" href="/packages?q=sdk%3Adart" rel="nofollow" title="Packages compatible with Dart SDK">Dart</a></div><div class="-pub-tag-badge"><span class="tag-badge-main">Platform</span><a class="tag-badge-sub" href="/packages?q=platform%3Alinux" rel="nofollow" title="Packages compatible with Linux platform">Linux</a><a class="tag-badge-sub" href="/packages?q=platform%3Amacos" rel="nofollow" title="Packages compatible with macOS platform">macOS</a><a class="tag-badge-sub" href="/packages?q=platform%3Awindows" rel="nofollow" title="Packages compatible with Windows platform">Windows</a></div></div><div class="detail-like"><button id="-pub-like-icon-button" class="mdc-icon-button" data-ga-click-event="toggle-like" aria-pressed="false" title="Like this package"><img class="mdc-icon-button__icon" src="/static/hash-o6oemknr/img/like-inactive.svg" alt="liked status: inactive" width="18" height="18"/><img class="mdc-icon-button__icon mdc-icon-button__icon--on" src="/static/hash-o6oemknr/img/like-active.svg" alt="liked status: active" width="18" height="18"/></button><span class="likes-count"><span id="likes-count">155</span></span></div></div></div></div></div></div><div class="detail-container"><div class="detail-lead"><div class="detail-metadata-toggle"><div class="detail-metadata-toggle-icon">→</div><h3 class="detail-lead-title">Metadata</h3></div><p class="detail-lead-text">Source code generation builders and utilities for the Dart build system</p><p class="detail-lead-more"><a class="detail-metadata-toggle">More...</a></p></div></div><div class="detail-body"><div class="detail-tabs"><div class="detail-tabs-wide-header"><div class="detail-container"><ul class="detail-tabs-header"><li class="detail-tab tab-button detail-tab-readme-title -active">Readme</li><li class="detail-tab tab-link detail-tab-changelog-title"><a href="/packages/source_gen/changelog" role="button">Changelog</a></li><li class="detail-tab tab-link detail-tab-installing-title"><a href="/packages/source_gen/install" role="button">Installing</a></li><li class="detail-tab tab-link detail-tab-versions-title"><a href="/packages/source_gen/versions" role="button">Versions</a></li><li class="detail-tab tab-link detail-tab-analysis-title"><a href="/packages/source_gen/score" role="button">Scores</a></li></ul></div></div><div class="detail-container detail-body-main"><div class="detail-tabs-content"><section class="tab-content detail-tab-readme-content -active markdown-body"><p><a href="https://github.com/dart-lang/source_gen/actions/workflows/dart.yml" rel="ugc"><img src="https://github.com/dart-lang/source_gen/actions/workflows/dart.yml/badge.svg" alt="Dart CI"></a> <a href="https://pub.dev/packages/source_gen"> <img src="https://img.shields.io/pub/v/source_gen.svg" alt="Pub Package Version"> </a> <a href="https://gitter.im/dart-lang/build" rel="ugc"> <img src="https://badges.gitter.im/dart-lang/build.svg" alt="Join the chat on Gitter"> </a></p> <h2 class="hash-header" id="overview">Overview <a href="#overview" class="hash-link">#</a></h2> <p><code>source_gen</code> provides utilities for automated source code generation for Dart:</p> <ul> <li>A <strong>framework</strong> for writing Builders that consume and produce Dart code.</li> <li>A <strong>convention</strong> for human and tool generated Dart code to coexist with clean separation, and for multiple code generators to integrate in the same project.</li> </ul> <p>Its main purpose is to expose a developer-friendly API on top of lower-level packages like the <a href="https://pub.dev/packages/analyzer">analyzer</a> or <a href="https://pub.dev/packages/build">build</a>. You don't <em>have</em> to use <code>source_gen</code> in order to generate source code; we also expose a set of library APIs that might be useful in your generators.</p> <h2 class="hash-header" id="quick-start-guide-for-writing-a-generator">Quick Start Guide for writing a Generator <a href="#quick-start-guide-for-writing-a-generator" class="hash-link">#</a></h2> <p>Add a dependency on <code>source_gen</code> in your pubspec.</p> <pre><code class="language-yaml">dependencies: source_gen: </code></pre> <p>If you're only using <code>source_gen</code> in your own project to generate code and you won't publish your Generator for others to use, it can be a <code>dev_dependency</code>:</p> <pre><code class="language-yaml">dev_dependencies: source_gen: </code></pre> <p>Once you have <code>source_gen</code> setup, you should reference the examples below.</p> <h3 class="hash-header" id="writing-a-generator-to-output-dart-source-code">Writing a generator to output Dart source code <a href="#writing-a-generator-to-output-dart-source-code" class="hash-link">#</a></h3> <p>Extend the <code>Generator</code> or <code>GeneratorForAnnotation</code> class and <code>source_gen</code> will call your generator for a Dart library or for each element within a library tagged with the annotation you are interested in.</p> <ul> <li><a href="https://github.com/dart-lang/source_gen/blob/master/source_gen/test/src/comment_generator.dart" rel="ugc">Trivial example</a></li> <li><a href="https://github.com/dart-lang/source_gen/tree/master/example" rel="ugc">Full example package</a> with <a href="https://github.com/dart-lang/source_gen/tree/master/example_usage" rel="ugc">example usage</a>.</li> </ul> <h3 class="hash-header" id="configuring-and-running-generators">Configuring and Running generators <a href="#configuring-and-running-generators" class="hash-link">#</a></h3> <p><code>source_gen</code> is based on the <a href="https://pub.dev/packages/build">build</a> package and exposes options for using your <code>Generator</code> in a <code>Builder</code>. Choose a Builder based on where you want the generated code to end up:</p> <ul> <li>If you want to write to <code>.g.dart</code> files which are referenced as a <code>part</code> in the original source file, use <code>SharedPartBuilder</code>. This is the convention for generated code in part files, and this file may also contain code from <code>Generator</code>s provided by other packages.</li> <li>If you want to write to <code>.some_name.dart</code> files which are referenced as a <code>part</code> in the original source file, use <code>PartBuilder</code>. You should choose an extension unique to your package. Multiple <code>Generator</code>s may output to this file, but they will all come from your package and you will set up the entire list when constructing the builder. Using the extension <code>.g.dart</code> may cause conflicts with other projects that use <code>SharedPartBuilder</code> since outputs must be unique.</li> <li>If you want to write standalone Dart library which can be <code>import</code>ed use <code>LibraryBuilder</code>. Only a single <code>Generator</code> may be used as a <code>LibraryBuilder</code>.</li> </ul> <p>In order to get the <code>Builder</code> used with <a href="https://pub.dev/packages/build_runner">build_runner</a> it must be configured in a <code>build.yaml</code> file. See <a href="https://pub.dev/packages/build_config">build_config</a> for more details. Whenever you are publishing a package that includes a <code>build.yaml</code> file you should include a dependency on <code>build_config</code> in your pubspec.</p> <p>When using <code>SharedPartBuilder</code> it should always be configured to <code>build_to: cache</code> (hidden files) and apply the <code>combining_builder</code> from this package. The combining builder reads in all the pieces written by different shared part builders and writes them to the final <code>.g.dart</code> output in the user's source directory. You should never use the <code>.g.dart</code> extension for any other Builder.</p> <pre><code class="language-yaml">builders: some_cool_builder: import: "package:this_package/builder.dart" builder_factories: ["someCoolBuilder"] # The `partId` argument to `SharedPartBuilder` is "some_cool_builder" build_extensions: {".dart": [".some_cool_builder.g.part"]} auto_apply: dependents build_to: cache # To copy the `.g.part` content into `.g.dart` in the source tree applies_builders: ["source_gen:combining_builder"] </code></pre> <h3 class="hash-header" id="configuring-combining_builder">Configuring <code>combining_builder</code> <a href="#configuring-combining_builder" class="hash-link">#</a></h3> <h4 id="ignore_for_file"><code>ignore_for_file</code></h4> <p>Sometimes generated code does not support all of the <a href="https://dart-lang.github.io/linter/" rel="ugc">lints</a> specified in the target package. When using a <code>Builder</code> based on <code>package:source_gen</code> which applies <code>combining_builder</code>, set the <code>ignore_for_file</code> option to a list of lints you wish to be ignored in all generated libraries.</p> <p><em>Example <code>build.yaml</code> configuration:</em></p> <pre><code class="language-yaml">targets: $default: builders: source_gen:combining_builder: options: ignore_for_file: - lint_alpha - lint_beta </code></pre> <h4 id="preamble"><code>preamble</code></h4> <p>When using a <code>Builder</code> based on <code>package:source_gen</code> which applies <code>combining_builder</code>, set the <code>preamble</code> option to a string you wish to be prepended to all generated libraries.</p> <p><em>Example <code>build.yaml</code> configuration:</em></p> <pre><code class="language-yaml">targets: $default: builders: source_gen:combining_builder: options: preamble: | // Foo // Bar </code></pre> <p>Hint: When both <code>ignore_for_file</code> and <code>preamble</code> are used the generated libraries will contain the lints of <code>ignore_for_file</code> on top of the <code>preamble</code>.</p> <p>If you provide a builder that uses <code>SharedPartBuilder</code> and <code>combining_builder</code>, you should document these features for your users.</p> <h3 class="hash-header" id="generating-files-in-different-directories">Generating files in different directories <a href="#generating-files-in-different-directories" class="hash-link">#</a></h3> <p>The output location for an input file can be changed:</p> <ul> <li>when using <code>PartBuilder</code> or <code>LibraryBuilder</code>.</li> <li>when using <code>SharedPartBuilder</code> which apply the <code>combining_builder</code> as part of the build.</li> </ul> <p>By default, a <code>.g.dart</code> or <code>.some_name.dart</code> file is generated next to the input. To change this, set the <code>build_extensions</code> option on the corresponding builder. In the options, <code>build_extensions</code> is a map from <code>String</code> to <code>String</code>, where the key is matches inputs and the value is a single build output. For more details on build extensions, see <a href="https://github.com/dart-lang/build/blob/master/docs/writing_a_builder.md#configuring-outputs" rel="ugc">the docs in the build package</a>.</p> <p>For example, you can use these options to generate files under <code>lib/generated</code> with the following build configuration:</p> <pre><code class="language-yaml">targets: $default: builders: # A SharedPartBuilder which uses the combining builder source_gen:combining_builder: options: build_extensions: '^lib/{{}}.dart': 'lib/generated/{{}}.g.dart' # A PartBuilder or LibraryBuilder some_cool_builder: options: build_extensions: '^lib/models/{{}}.dart': 'lib/models/generated/{{}}.foo.dart' </code></pre> <p>Remember to change the <code>part</code> statement in the input to refer to the correct output file in the other directory.</p> <p>Note that builder options are part of <code>source_gen</code>'s public api! When using them in a build configuration, always add a dependency on <code>source_gen</code> as well:</p> <pre><code class="language-yaml">dev_dependencies: source_gen: ^1.1.0 </code></pre> <h2 class="hash-header" id="faq">FAQ <a href="#faq" class="hash-link">#</a></h2> <h3 class="hash-header" id="what-is-the-difference-between-source_gen-and-build">What is the difference between <code>source_gen</code> and <a href="https://pub.dev/packages/build">build</a>? <a href="#what-is-the-difference-between-source_gen-and-build" class="hash-link">#</a></h3> <p>Build is a platform-agnostic framework for Dart asset or code generation that is pluggable into build systems including <a href="https://pub.dev/packages/_bazel_codegen">bazel</a>, and standalone tools like <a href="https://pub.dev/packages/build_runner">build_runner</a>. You could also build your own.</p> <p>Meanwhile, <code>source_gen</code> provides an API and tooling that is easily usable on top of <code>build</code> to make common tasks easier and more developer friendly. For example the <a href="https://pub.dev/documentation/source_gen/latest/source_gen/PartBuilder-class.html"><code>PartBuilder</code></a> class wraps one or more <a href="https://pub.dev/documentation/source_gen/latest/source_gen/Generator-class.html"><code>Generator</code></a> instances to make a <a href="https://pub.dev/documentation/build/latest/build/Builder-class.html"><code>Builder</code></a> which creates <code>part of</code> files, while the <a href="https://pub.dev/documentation/source_gen/latest/source_gen/LibraryBuilder-class.html"><code>LibraryBuilder</code></a> class wraps a single Generator to make a <code>Builder</code> which creates Dart library files.</p> <!-- Packages --> <!-- Dartdoc --> <h2 class="hash-header" id="publishing-automation">Publishing automation <a href="#publishing-automation" class="hash-link">#</a></h2> <p>For information about our publishing automation and release process, see <a href="https://github.com/dart-lang/ecosystem/wiki/Publishing-automation" rel="ugc">https://github.com/dart-lang/ecosystem/wiki/Publishing-automation</a>.</p> </section></div></div></div><aside class="detail-info-box"><a class="packages-scores" href="/packages/source_gen/score"><div class="packages-score packages-score-like"><div class="packages-score-value -has-value"><span class="packages-score-value-number">155</span><span class="packages-score-value-sign"></span></div><div class="packages-score-label">likes</div></div><div class="packages-score packages-score-health"><div class="packages-score-value -has-value"><span class="packages-score-value-number">150</span><span class="packages-score-value-sign"></span></div><div class="packages-score-label">pub points</div></div><div class="packages-score packages-score-popularity"><div class="packages-score-value -has-value"><span class="packages-score-value-number">94</span><span class="packages-score-value-sign">%</span></div><div class="packages-score-label">popularity</div></div></a><h3 class="title">Publisher</h3><p><a href="/publishers/tools.dart.dev"><img class="-pub-publisher-shield filter-invert-on-dark" src="/static/hash-o6oemknr/img/material-icon-verified.svg" alt="verified publisher" width="14" height="14" title="Published by a pub.dev verified publisher"/>tools.dart.dev</a></p><h3 class="title pkg-infobox-metadata">Metadata</h3><p>Source code generation builders and utilities for the Dart build system</p><p><a class="link" href="https://github.com/dart-lang/source_gen/tree/master/source_gen" rel="ugc">Repository (GitHub)</a><br/><a class="link" href="https://github.com/dart-lang/source_gen/issues" rel="ugc">View&#47;report issues</a><br/><a class="link" href="https://github.com/dart-lang/source_gen/blob/master/CONTRIBUTING.md" rel="ugc">Contributing</a><br/></p><h3 class="title">Documentation</h3><p><a class="link" href="/documentation/source_gen/latest/">API reference</a><br/></p><h3 class="title">License</h3><p><img class="inline-icon-img filter-invert-on-dark" src="/static/hash-o6oemknr/img/material-icon-balance.svg" alt="" width="14" height="14" role="presentation"/>BSD-3-Clause (<a href="/packages/source_gen/license">license</a>)</p><h3 class="title">Dependencies</h3><p><a href="/packages/analyzer" title="&gt;=5.2.0 &lt;7.0.0">analyzer</a>, <a href="/packages/async" title="^2.5.0">async</a>, <a href="/packages/build" title="^2.1.0">build</a>, <a href="/packages/dart_style" title="^2.0.0">dart_style</a>, <a href="/packages/glob" title="^2.0.0">glob</a>, <a href="/packages/path" title="^1.8.0">path</a>, <a href="/packages/source_span" title="^1.8.0">source_span</a>, <a href="/packages/yaml" title="^3.0.0">yaml</a></p><h3 class="title">More</h3><p><a href="/packages?q=dependency%3Asource_gen" rel="nofollow">Packages that depend on source_gen</a></p></aside></div><script type="application/ld+json">{"@context":"http\u003a\u002f\u002fschema.org","@type":"SoftwareSourceCode","name":"source\u005fgen","version":"1.5.0","description":"source\u005fgen - Source code generation builders and utilities for the Dart build system","url":"https\u003a\u002f\u002fpub.dev\u002fpackages\u002fsource\u005fgen","dateCreated":"2015-01-30T21\u003a13\u003a01.757Z","dateModified":"2023-12-13T22\u003a53\u003a11.649167Z","programmingLanguage":"Dart","image":"https\u003a\u002f\u002fpub.dev\u002fstatic\u002fimg\u002fpub-dev-icon-cover-image.png","license":"https\u003a\u002f\u002fpub.dev\u002fpackages\u002fsource\u005fgen\u002flicense"}</script></div><div class="detail-metadata"><h3 class="detail-metadata-title"><span class="detail-metadata-toggle">←</span> Metadata</h3><div class="detail-info-box"><a class="packages-scores" href="/packages/source_gen/score"><div class="packages-score packages-score-like"><div class="packages-score-value -has-value"><span class="packages-score-value-number">155</span><span class="packages-score-value-sign"></span></div><div class="packages-score-label">likes</div></div><div class="packages-score packages-score-health"><div class="packages-score-value -has-value"><span class="packages-score-value-number">150</span><span class="packages-score-value-sign"></span></div><div class="packages-score-label">pub points</div></div><div class="packages-score packages-score-popularity"><div class="packages-score-value -has-value"><span class="packages-score-value-number">94</span><span class="packages-score-value-sign">%</span></div><div class="packages-score-label">popularity</div></div></a><h3 class="title">Publisher</h3><p><a href="/publishers/tools.dart.dev"><img class="-pub-publisher-shield filter-invert-on-dark" src="/static/hash-o6oemknr/img/material-icon-verified.svg" alt="verified publisher" width="14" height="14" title="Published by a pub.dev verified publisher"/>tools.dart.dev</a></p><h3 class="title pkg-infobox-metadata">Metadata</h3><p>Source code generation builders and utilities for the Dart build system</p><p><a class="link" href="https://github.com/dart-lang/source_gen/tree/master/source_gen" rel="ugc">Repository (GitHub)</a><br/><a class="link" href="https://github.com/dart-lang/source_gen/issues" rel="ugc">View&#47;report issues</a><br/><a class="link" href="https://github.com/dart-lang/source_gen/blob/master/CONTRIBUTING.md" rel="ugc">Contributing</a><br/></p><h3 class="title">Documentation</h3><p><a class="link" href="/documentation/source_gen/latest/">API reference</a><br/></p><h3 class="title">License</h3><p><img class="inline-icon-img filter-invert-on-dark" src="/static/hash-o6oemknr/img/material-icon-balance.svg" alt="" width="14" height="14" role="presentation"/>BSD-3-Clause (<a href="/packages/source_gen/license">license</a>)</p><h3 class="title">Dependencies</h3><p><a href="/packages/analyzer" title="&gt;=5.2.0 &lt;7.0.0">analyzer</a>, <a href="/packages/async" title="^2.5.0">async</a>, <a href="/packages/build" title="^2.1.0">build</a>, <a href="/packages/dart_style" title="^2.0.0">dart_style</a>, <a href="/packages/glob" title="^2.0.0">glob</a>, <a href="/packages/path" title="^1.8.0">path</a>, <a href="/packages/source_span" title="^1.8.0">source_span</a>, <a href="/packages/yaml" title="^3.0.0">yaml</a></p><h3 class="title">More</h3><p><a href="/packages?q=dependency%3Asource_gen" rel="nofollow">Packages that depend on source_gen</a></p></div><p class="detail-lead-back"><a class="detail-metadata-toggle">Back</a></p></div><div id="-screenshot-carousel" class="carousel"><fab id="-carousel-prev" class="mdc-fab carousel-prev carousel-nav" data-mdc-auto-init="MDCRipple" title="Previous" data-ga-click-event="screenshot-carousel-prev-click" tabindex="0"><div class="mdc-fab__ripple"></div><img class="mdc-fab__icon" src="/static/hash-o6oemknr/img/keyboard_arrow_left.svg" alt="previous" width="24" height="24" aria-hidden="true"/></fab><div id="-image-container" class="image-container"></div><fab id="-carousel-next" class="mdc-fab carousel-next carousel-nav" data-mdc-auto-init="MDCRipple" title="Next" data-ga-click-event="screenshot-carousel-next-click" tabindex="0"><div class="mdc-fab__ripple"></div><img class="mdc-fab__icon" src="/static/hash-o6oemknr/img/keyboard_arrow_right.svg" alt="next" width="24" height="24" aria-hidden="true"/></fab><p id="-screenshot-description" class="screenshot-description"></p></div></main><footer class="site-footer"><a class="link" href="https://dart.dev/">Dart language</a><a class="link sep" href="/report?subject=package%3Asource_gen&amp;url=https%3A%2F%2Fpub.dev%2Fpackages%2Fsource_gen">Report package</a><a class="link sep" href="/policy">Policy</a><a class="link sep" href="https://www.google.com/intl/en/policies/terms/">Terms</a><a class="link sep" href="https://developers.google.com/terms/">API Terms</a><a class="link sep" href="/security">Security</a><a class="link sep" href="https://www.google.com/intl/en/policies/privacy/">Privacy</a><a class="link sep" href="/help">Help</a><a class="link icon sep" href="/feed.atom"><img class="inline-icon" src="/static/hash-o6oemknr/img/rss-feed-icon.svg" alt="RSS" width="20" height="20" title="RSS/atom feed"/></a><a class="link icon github_issue" href="https://github.com/dart-lang/pub-dev/issues/new"><img class="inline-icon" src="/static/hash-o6oemknr/img/bug-report-white-96px.png" alt="bug report" width="20" height="20" title="Report an issue with this site"/></a></footer><script src="/static/hash-o6oemknr/highlight/highlight-with-init.js" defer="defer"></script></body></html>

Pages: 1 2 3 4 5 6 7 8 9 10