<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Daichi Furiya</title>
    <description>The latest articles on DEV Community by Daichi Furiya (@wasabeef).</description>
    <link>https://dev.to/wasabeef</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F355593%2F31801d8c-da33-44d6-ba85-9f79db4b782e.jpg</url>
      <title>DEV Community: Daichi Furiya</title>
      <link>https://dev.to/wasabeef</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/wasabeef"/>
    <language>en</language>
    <item>
      <title>Introducing Agent Note: saving the why behind AI-assisted code in Git</title>
      <dc:creator>Daichi Furiya</dc:creator>
      <pubDate>Mon, 18 May 2026 04:28:20 +0000</pubDate>
      <link>https://dev.to/wasabeef/introducing-agent-note-saving-the-why-behind-ai-assisted-code-in-git-30a8</link>
      <guid>https://dev.to/wasabeef/introducing-agent-note-saving-the-why-behind-ai-assisted-code-in-git-30a8</guid>
      <description>&lt;p&gt;Hi, I'm wasabeef.&lt;/p&gt;

&lt;p&gt;I have been using coding agents such as Claude Code, Codex CLI, Cursor, and Gemini CLI regularly in daily development.&lt;/p&gt;

&lt;p&gt;They no longer feel like experiments. They can already produce reviewable Pull Requests. But while reviewing AI-assisted changes, I kept running into the same problem.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A diff tells you what changed. It does not tell you why it changed.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That is already a problem with human-written commits when the commit message is weak. With AI-assisted commits, the missing context is even larger: the prompt, the response, the discussion that led to the implementation, the agent that touched each file, and the reason a particular path was chosen.&lt;/p&gt;

&lt;p&gt;That is why I built &lt;a href="https://github.com/wasabeef/AgentNote" rel="noopener noreferrer"&gt;Agent Note&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwn4es8qe1t4a8ib48alc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwn4es8qe1t4a8ib48alc.png" alt="Agent Note — AI conversations saved to Git" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This article focuses less on the exact usage and more on why this kind of record is needed, and how Agent Note keeps that context in Git.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is missing in AI-era code review
&lt;/h2&gt;

&lt;p&gt;AI coding agents have become common in everyday development.&lt;/p&gt;

&lt;p&gt;They write code quickly. They add tests. They update documentation. They can even open Pull Requests.&lt;/p&gt;

&lt;p&gt;But review exposes a different problem.&lt;/p&gt;

&lt;p&gt;The final diff does not show the background of the implementation.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What request started the change?&lt;/li&gt;
&lt;li&gt;What assumptions did the AI make?&lt;/li&gt;
&lt;li&gt;Did the direction change halfway through?&lt;/li&gt;
&lt;li&gt;Is this a generated bundle, or source code someone intentionally edited?&lt;/li&gt;
&lt;li&gt;Which commits were mostly AI-assisted, and which were mostly human follow-up?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In human-to-human development, commit messages, Pull Request descriptions, and review comments have carried that context.&lt;/p&gt;

&lt;p&gt;In AI-assisted development, prompts and responses also belong in the review context. Without them, reviewers lose the trail before review even starts.&lt;/p&gt;

&lt;p&gt;Until now, the conversation with the AI often stayed inside the agent UI or a local transcript. Once the session ended, the team usually received only the commit and the Pull Request.&lt;/p&gt;

&lt;p&gt;The reason behind the change disappears.&lt;/p&gt;

&lt;h2&gt;
  
  
  AI review tools need context too
&lt;/h2&gt;

&lt;p&gt;I also use AI review tools such as Copilot, CodeRabbit, Devin, and Greptile.&lt;/p&gt;

&lt;p&gt;Their main inputs are usually the diff and the repository code.&lt;/p&gt;

&lt;p&gt;That means AI can review AI-written code without seeing the prompt or intent that produced it.&lt;/p&gt;

&lt;p&gt;When that happens, the review tends to stay near the surface of the diff.&lt;/p&gt;

&lt;p&gt;To judge whether an implementation matches the intended change, a reviewer needs more than the final code. The reviewer needs to know what the author asked for, what the agent understood, and which parts of the repository were supposed to change.&lt;/p&gt;

&lt;p&gt;Agent Note keeps that context in the Pull Request in a form AI review tools can read.&lt;/p&gt;

&lt;p&gt;It renders a human-readable summary in the Pull Request body, and also embeds an &lt;code&gt;agentnote-reviewer-context&lt;/code&gt; hidden comment. It is invisible in the rendered PR body, but AI review tools that read the raw Pull Request description can use it to understand changed areas, review focus, and author intent.&lt;/p&gt;

&lt;p&gt;The reviewer gets more than the diff.&lt;/p&gt;

&lt;h3&gt;
  
  
  Today
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git diff
Pull Request description

Prompt?       missing
Response?     missing
Why this way? reviewers have to infer it
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  With Agent Note
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git diff
Pull Request description
refs/notes/agentnote
Dashboard

Prompt / Response / Context / AI Ratio stay connected to the commit
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  What gets recorded
&lt;/h2&gt;

&lt;p&gt;Agent Note saves the AI conversation and changed files for each commit.&lt;/p&gt;

&lt;p&gt;Think of it as &lt;code&gt;git log&lt;/code&gt; with the AI conversation behind the change attached to it.&lt;/p&gt;

&lt;p&gt;It records four kinds of information.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Data&lt;/th&gt;
&lt;th&gt;What it helps you see&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Prompt / Response&lt;/td&gt;
&lt;td&gt;What was requested and how the AI answered&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Files&lt;/td&gt;
&lt;td&gt;Which files the agent touched&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AI Ratio&lt;/td&gt;
&lt;td&gt;A practical estimate of how much of the commit involved AI&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Context&lt;/td&gt;
&lt;td&gt;Extra context when the prompt alone is too short&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;For example, a prompt like &lt;code&gt;yes, implement it&lt;/code&gt; does not carry enough meaning when it appears alone in a Pull Request.&lt;/p&gt;

&lt;p&gt;Agent Note does not try to inflate that prompt. Instead, when the surrounding commit evidence helps, it can attach a short &lt;code&gt;Context&lt;/code&gt; note.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5i3ej6qdixw13z2vi155.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5i3ej6qdixw13z2vi155.png" alt="Context shown in the Agent Note Dashboard" width="800" height="466"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The point is not to say "this code is correct because AI wrote it" or "this code is risky because AI wrote it."&lt;/p&gt;

&lt;p&gt;The point is to give reviewers better evidence.&lt;/p&gt;

&lt;h2&gt;
  
  
  How it works
&lt;/h2&gt;

&lt;p&gt;Agent Note is not a hosted service.&lt;/p&gt;

&lt;p&gt;It adds a thin recording layer next to the normal Git workflow.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;You prompt your coding agent
        │
        ▼
Agent hooks save the conversation and session info
        │
        ▼
The agent edits files
        │
        ▼
Hooks or local transcripts record changed files
        │
        ▼
You run `git commit`
        │
        ▼
A Git hook links the session to the commit
        │
        ▼
Agent Note writes a Git note for that commit
        │
        ▼
Agent Note's pre-push hook shares `refs/notes/agentnote`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Temporary session data lives under &lt;code&gt;.git/agentnote/&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The permanent record lives in &lt;code&gt;refs/notes/agentnote&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Agent Note does not modify the commit diff. It adds only a short session trailer to the commit message and stores the detailed record in Git notes. When you need the AI context behind a commit, you read the Git note.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Git notes
&lt;/h2&gt;

&lt;p&gt;The design constraint I cared about most was avoiding unnecessary workflow changes.&lt;/p&gt;

&lt;p&gt;I did not want to replace &lt;code&gt;git commit&lt;/code&gt;, and I did not want the core record to depend on a hosted service.&lt;/p&gt;

&lt;p&gt;The context behind AI-assisted code should be a team asset, just like the commit itself. Keeping that context in Git felt natural.&lt;/p&gt;

&lt;p&gt;Git notes let Agent Note attach structured data to a commit without changing the regular commit history.&lt;/p&gt;

&lt;p&gt;That balance felt right.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use normal &lt;code&gt;git log&lt;/code&gt; and Pull Requests most of the time&lt;/li&gt;
&lt;li&gt;Read Agent Note data only when you need the deeper context&lt;/li&gt;
&lt;li&gt;Share it with the team through &lt;code&gt;refs/notes/agentnote&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Avoid requiring a hosted service&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The design keeps AI development context close to Git instead of sending it somewhere else.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Agent Note does not do
&lt;/h2&gt;

&lt;p&gt;Agent Note is not a tool for proving that AI-written code is correct.&lt;/p&gt;

&lt;p&gt;AI Ratio is not an automatic judgment of responsibility or quality. It is a practical signal for understanding how much AI involvement a commit appears to have.&lt;/p&gt;

&lt;p&gt;Agent Note also does not claim perfect line-to-prompt attribution today. &lt;code&gt;agent-note why&lt;/code&gt; is a shortcut from a line, to the blamed commit, to the prompts, responses, and context attached to that commit.&lt;/p&gt;

&lt;p&gt;The goal is not to replace review. The goal is to keep the context reviewers need from disappearing.&lt;/p&gt;

&lt;h2&gt;
  
  
  How it fits with Spec-Driven Development
&lt;/h2&gt;

&lt;p&gt;Spec-Driven Development makes the intent explicit before implementation.&lt;/p&gt;

&lt;p&gt;That works well with AI coding agents. If the input is vague, the agent may still produce code quickly, but reviewers later have to guess why the implementation took that shape.&lt;/p&gt;

&lt;p&gt;A spec alone does not preserve the implementation conversation. It does not show how the agent interpreted the task, what changed during the session, or which prompts ended up in each commit.&lt;/p&gt;

&lt;p&gt;If the spec is the intent before implementation, Agent Note is the execution record after implementation.&lt;/p&gt;

&lt;p&gt;Together, they let reviewers compare the implementation against the spec, and also inspect the AI conversation that produced the commit.&lt;/p&gt;

&lt;h2&gt;
  
  
  How it relates to Entire
&lt;/h2&gt;

&lt;p&gt;Agent Note is not the only project working on this problem.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.entire.io/overview" rel="noopener noreferrer"&gt;Entire&lt;/a&gt; also connects the context behind AI-assisted code changes to Git. Entire records prompts, transcripts, tool calls, changed files, and other session data as Checkpoints linked to commits. It is a broader system for agent development history, including rewind, resume, search, and a web UI.&lt;/p&gt;

&lt;p&gt;Agent Note is intentionally narrower.&lt;/p&gt;

&lt;p&gt;It focuses on commits and Pull Request review. The persistent record lives in Git notes under &lt;code&gt;refs/notes/agentnote&lt;/code&gt;, and the main surfaces are the PR Report, Dashboard, hidden reviewer context for AI review tools, and &lt;code&gt;agent-note why&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;I do not see this as a matter of which approach is correct. The scope is different.&lt;/p&gt;

&lt;p&gt;If you want full session Checkpoints, rewind, resume, and repository-wide search, a system like Entire makes sense. If you mainly want lightweight commit-level review context in Pull Requests, Agent Note is designed for that narrower workflow.&lt;/p&gt;

&lt;h2&gt;
  
  
  PR Report and Dashboard
&lt;/h2&gt;

&lt;p&gt;In Pull Requests, Agent Note renders a human-readable summary.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;## 🧑💬🤖 Agent Note&lt;/span&gt;

&lt;span class="gs"&gt;**Total AI Ratio:**&lt;/span&gt; ██████░░ 73%
&lt;span class="gs"&gt;**Model:**&lt;/span&gt; &lt;span class="sb"&gt;`claude-sonnet-4-20250514`&lt;/span&gt;

| Commit | AI Ratio | Prompts | Files |
|---|---|---|---|
| ce941f7 feat: add auth | ████░ 73% | 2 | auth.ts, token.ts |

Open Dashboard ↗
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The PR Report is the entry point for review.&lt;/p&gt;

&lt;p&gt;The Dashboard is for deeper reading.&lt;/p&gt;

&lt;p&gt;In the Dashboard, you can inspect Prompt / Response, changed files, AI Ratio, and diffs by PR and by commit.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiiszgtnecgiunsgawcop.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiiszgtnecgiunsgawcop.png" alt="Agent Note Dashboard preview" width="800" height="776"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The report answers "what should I look at first?" The Dashboard answers "what happened in this commit?"&lt;/p&gt;

&lt;h2&gt;
  
  
  The idea behind &lt;code&gt;agent-note why&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;Agent Note also includes &lt;code&gt;agent-note why&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;It starts from a target line, uses &lt;code&gt;git blame&lt;/code&gt; to find the commit, then reads the Agent Note attached to that commit.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx agent-note why README.md:111
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It does not claim exact line-to-prompt attribution yet.&lt;/p&gt;

&lt;p&gt;But even without a new schema, connecting an individual line to the commit conversation is useful. It shortens the path from "why is this line here?" to "what did we ask the agent to do in that commit?"&lt;/p&gt;

&lt;p&gt;Eventually, I want to get closer to line-level explanations. The MVP is intentionally smaller: connect existing Git blame data with existing Git note data and make the available context easy to reach.&lt;/p&gt;

&lt;h2&gt;
  
  
  Different agents expose different context
&lt;/h2&gt;

&lt;p&gt;Agent Note supports multiple coding agents, but each agent exposes a different level of detail.&lt;/p&gt;

&lt;p&gt;That is because every agent exposes hooks and transcripts differently.&lt;/p&gt;

&lt;p&gt;Claude Code provides the richest signal today. Codex CLI, Cursor, and Gemini CLI are also supported, but Agent Note records only the prompt, response, changed files, and AI Ratio evidence that each agent can expose reliably.&lt;/p&gt;

&lt;p&gt;I also do not want to overstate the evidence.&lt;/p&gt;

&lt;p&gt;If Agent Note cannot know something reliably, it does not pretend to know it. AI Ratio is an estimate, not proof.&lt;/p&gt;

&lt;p&gt;The latest support matrix is available in &lt;a href="https://wasabeef.github.io/AgentNote/agent-support/" rel="noopener noreferrer"&gt;Agent Support&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Things to keep in mind
&lt;/h2&gt;

&lt;p&gt;Agent Note records conversations with AI for the team.&lt;/p&gt;

&lt;p&gt;That record should be handled carefully.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Do not put secrets in prompts or responses&lt;/li&gt;
&lt;li&gt;When Git notes are pushed, the team can read the saved conversation&lt;/li&gt;
&lt;li&gt;AI Ratio is an estimate, not an automatic judgment of quality or responsibility&lt;/li&gt;
&lt;li&gt;Different agents expose different levels of detail&lt;/li&gt;
&lt;li&gt;Gemini CLI support is still Preview&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Agent Note is closer to review context than to an audit verdict.&lt;/p&gt;

&lt;h2&gt;
  
  
  Closing
&lt;/h2&gt;

&lt;p&gt;The more we use AI coding agents, the less a diff alone is enough for code review.&lt;/p&gt;

&lt;p&gt;Human commits have commit messages and Pull Request discussions. AI-assisted commits should also preserve prompts, responses, context, and AI Ratio.&lt;/p&gt;

&lt;p&gt;Agent Note is an open source, Git-native way to do that.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GitHub: &lt;a href="https://github.com/wasabeef/AgentNote" rel="noopener noreferrer"&gt;https://github.com/wasabeef/AgentNote&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Documentation: &lt;a href="https://wasabeef.github.io/AgentNote/" rel="noopener noreferrer"&gt;https://wasabeef.github.io/AgentNote/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;npm: &lt;a href="https://www.npmjs.com/package/agent-note" rel="noopener noreferrer"&gt;https://www.npmjs.com/package/agent-note&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you want AI-assisted code to remain understandable after the session is over, please give Agent Note a try.&lt;/p&gt;

</description>
      <category>agents</category>
      <category>ai</category>
      <category>git</category>
      <category>showdev</category>
    </item>
    <item>
      <title>The Flutter code generator for your assets, fonts, colors, … — Get rid of all String-based APIs.</title>
      <dc:creator>Daichi Furiya</dc:creator>
      <pubDate>Wed, 09 Sep 2020 14:59:20 +0000</pubDate>
      <link>https://dev.to/wasabeef/the-flutter-code-generator-for-your-assets-fonts-colors-get-rid-of-all-string-based-apis-25l6</link>
      <guid>https://dev.to/wasabeef/the-flutter-code-generator-for-your-assets-fonts-colors-get-rid-of-all-string-based-apis-25l6</guid>
      <description>&lt;p&gt;
  &lt;a href="https://github.com/FlutterGen/flutter_gen" rel="noopener noreferrer"&gt;
    &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2FFlutterGen%2Fflutter_gen%2Fraw%2Fmain%2Fart%2Flogo.png"&gt;
  &lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;Hey guys, We created the FlutterGen.&lt;/p&gt;

&lt;p&gt;It's a Flutter code generator for your assets, fonts, colors, … — Get rid of all String-based APIs.&lt;/p&gt;

&lt;p&gt;Inspired by &lt;a href="https://github.com/SwiftGen/SwiftGen" rel="noopener noreferrer"&gt;SwiftGen&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Motivation.
&lt;/h2&gt;

&lt;p&gt;Using asset path string directly is not safe.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;

&lt;span class="c1"&gt;# pubspec.yaml&lt;/span&gt;
&lt;span class="na"&gt;flutter&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;assets&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;assets/images/profile.jpg&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;❌ &lt;strong&gt;Bad&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
What would happen if you made a typo?&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;

&lt;span class="n"&gt;Widget&lt;/span&gt; &lt;span class="nf"&gt;build&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;BuildContext&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;Image&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;asset&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'assets/images/profile.jpeg'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// The following assertion was thrown resolving an image codec:&lt;/span&gt;
&lt;span class="c1"&gt;// Unable to load asset: assets/images/profile.jpeg&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;⭕️ &lt;strong&gt;Good&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
We want to use it safely.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;

&lt;span class="n"&gt;Widget&lt;/span&gt; &lt;span class="nf"&gt;build&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;BuildContext&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;Assets&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;images&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;profile&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
  
  
  Installation
&lt;/h2&gt;

&lt;p&gt;Run &lt;code&gt;fluttergen&lt;/code&gt; after the configuration &lt;a href="https://dart.dev/tools/pub/pubspec" rel="noopener noreferrer"&gt;&lt;code&gt;pubspec.yaml&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;
  
  
  Use this package as an executable
&lt;/h3&gt;
&lt;h4&gt;
  
  
  Using a Homebrew Formula
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;Install &lt;a href="https://github.com/FlutterGen/flutter_gen" rel="noopener noreferrer"&gt;FlutterGen&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="nv"&gt;$ &lt;/span&gt;brew &lt;span class="nb"&gt;install &lt;/span&gt;FlutterGen/tap/fluttergen


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;ol&gt;
&lt;li&gt;Use &lt;a href="https://github.com/FlutterGen/flutter_gen" rel="noopener noreferrer"&gt;FlutterGen&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="nv"&gt;$ &lt;/span&gt;fluttergen &lt;span class="nt"&gt;-h&lt;/span&gt;

&lt;span class="nv"&gt;$ &lt;/span&gt;fluttergen &lt;span class="nt"&gt;-c&lt;/span&gt; example/pubspec.yaml


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h4&gt;
  
  
  Using a Dart command-line
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;Install &lt;a href="https://github.com/FlutterGen/flutter_gen" rel="noopener noreferrer"&gt;FlutterGen&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="nv"&gt;$ &lt;/span&gt;pub global activate flutter_gen

&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;PATH&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$PATH&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;:&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$HOME&lt;/span&gt;&lt;span class="s2"&gt;/.pub-cache/bin"&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;ol&gt;
&lt;li&gt;Use &lt;a href="https://github.com/FlutterGen/flutter_gen" rel="noopener noreferrer"&gt;FlutterGen&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="nv"&gt;$ &lt;/span&gt;fluttergen &lt;span class="nt"&gt;-h&lt;/span&gt;

&lt;span class="nv"&gt;$ &lt;/span&gt;fluttergen &lt;span class="nt"&gt;-c&lt;/span&gt; example/pubspec.yaml


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  Use this package as a part of build_runner
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Add &lt;a href="https://pub.dev/packages/build_runner" rel="noopener noreferrer"&gt;build_runner&lt;/a&gt; and &lt;a href="https://github.com/FlutterGen/flutter_gen" rel="noopener noreferrer"&gt;FlutterGen&lt;/a&gt; to your package's pubspec.yaml file:&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

dev_dependencies:
  build_runner:
  flutter_gen_runner:


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;ol&gt;
&lt;li&gt;Install &lt;a href="https://github.com/FlutterGen/flutter_gen" rel="noopener noreferrer"&gt;FlutterGen&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="nv"&gt;$ &lt;/span&gt;flutter pub get


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;ol&gt;
&lt;li&gt;Use &lt;a href="https://github.com/FlutterGen/flutter_gen" rel="noopener noreferrer"&gt;FlutterGen&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

$ flutter packages pub run build_runner build


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
  
  
  Configuration file
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/FlutterGen/flutter_gen" rel="noopener noreferrer"&gt;FlutterGen&lt;/a&gt; generates dart files based on the key &lt;strong&gt;&lt;code&gt;flutter&lt;/code&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;code&gt;flutter_gen&lt;/code&gt;&lt;/strong&gt; of &lt;a href="https://dart.dev/tools/pub/pubspec" rel="noopener noreferrer"&gt;&lt;code&gt;pubspec.yaml&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;

&lt;span class="c1"&gt;# pubspec.yaml&lt;/span&gt;
&lt;span class="c1"&gt;# ...&lt;/span&gt;

&lt;span class="na"&gt;flutter_gen&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;output&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;lib/gen/&lt;/span&gt; &lt;span class="c1"&gt;# Optional (default: lib/gen/)&lt;/span&gt;
  &lt;span class="na"&gt;lineLength&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;80&lt;/span&gt; &lt;span class="c1"&gt;# Optional (default: 80)&lt;/span&gt;

  &lt;span class="na"&gt;integrations&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;flutter_svg&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;

  &lt;span class="na"&gt;colors&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;inputs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;assets/color/colors.xml&lt;/span&gt;

&lt;span class="na"&gt;flutter&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;uses-material-design&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
  &lt;span class="na"&gt;assets&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;assets/images/&lt;/span&gt;

  &lt;span class="na"&gt;fonts&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;family&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Raleway&lt;/span&gt;
      &lt;span class="na"&gt;fonts&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;asset&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;assets/fonts/Raleway-Regular.ttf&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;asset&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;assets/fonts/Raleway-Italic.ttf&lt;/span&gt;
          &lt;span class="na"&gt;style&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;italic&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
  
  
  Available Parsers
&lt;/h2&gt;
&lt;h3&gt;
  
  
  Assets
&lt;/h3&gt;

&lt;p&gt;Just follow the doc &lt;a href="https://flutter.dev/docs/development/ui/assets-and-images#specifying-assets" rel="noopener noreferrer"&gt;Adding assets and images#Specifying assets&lt;/a&gt; to specify assets, then &lt;a href="https://github.com/FlutterGen/flutter_gen" rel="noopener noreferrer"&gt;FlutterGen&lt;/a&gt; will generate related dart files.&lt;br&gt;&lt;br&gt;
No other specific configuration is required.&lt;br&gt;&lt;br&gt;
&lt;em&gt;Ignore duplicated.&lt;/em&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;

&lt;span class="c1"&gt;# pubspec.yaml&lt;/span&gt;
&lt;span class="na"&gt;flutter&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;assets&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;assets/images/&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;assets/images/chip3/chip.jpg&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;assets/images/chip4/chip.jpg&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;assets/images/icons/paint.svg&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;assets/json/fruits.json&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;pictures/ocean_view.jpg&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;These configurations will generate &lt;strong&gt;&lt;code&gt;assets.gen.dart&lt;/code&gt;&lt;/strong&gt; under the &lt;strong&gt;&lt;code&gt;lib/gen/&lt;/code&gt;&lt;/strong&gt; directory by default.&lt;/p&gt;

&lt;h4&gt;
  
  
  Usage Example
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://github.com/FlutterGen/flutter_gen" rel="noopener noreferrer"&gt;FlutterGen&lt;/a&gt; generates &lt;a href="https://api.flutter.dev/flutter/widgets/Image-class.html" rel="noopener noreferrer"&gt;Image&lt;/a&gt; class if the asset is Flutter supported image format.&lt;/p&gt;

&lt;p&gt;Example results of &lt;code&gt;assets/images/chip.jpg&lt;/code&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;Assets.images.chip&lt;/code&gt;&lt;/strong&gt; is an implementation of &lt;a href="https://api.flutter.dev/flutter/painting/AssetImage-class.html" rel="noopener noreferrer"&gt;&lt;code&gt;AssetImage class&lt;/code&gt;&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;Assets.images.chip.image(...)&lt;/code&gt;&lt;/strong&gt; returns &lt;a href="https://api.flutter.dev/flutter/widgets/Image-class.html" rel="noopener noreferrer"&gt;&lt;code&gt;Image class&lt;/code&gt;&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;Assets.images.chip.path&lt;/code&gt;&lt;/strong&gt; just returns the path string.&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;

&lt;span class="n"&gt;Widget&lt;/span&gt; &lt;span class="nf"&gt;build&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;BuildContext&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;Image&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nl"&gt;image:&lt;/span&gt; &lt;span class="n"&gt;Assets&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;images&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;chip&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="n"&gt;Widget&lt;/span&gt; &lt;span class="nf"&gt;build&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;BuildContext&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;Assets&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;images&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;chip&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="nl"&gt;width:&lt;/span&gt; &lt;span class="mi"&gt;120&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;height:&lt;/span&gt; &lt;span class="mi"&gt;120&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;fit:&lt;/span&gt; &lt;span class="n"&gt;BoxFit&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;scaleDown&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="n"&gt;Widget&lt;/span&gt; &lt;span class="nf"&gt;build&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;BuildContext&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// Assets.images.chip.path = 'assets/images/chip3/chip3.jpg'&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;Image&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;asset&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Assets&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;images&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;chip&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;



&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;If you are using SVG images with &lt;a href="https://pub.dev/packages/flutter_svg" rel="noopener noreferrer"&gt;flutter_svg&lt;/a&gt; you can use the integration feature.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;

&lt;span class="c1"&gt;# pubspec.yaml&lt;/span&gt;
&lt;span class="na"&gt;flutter_gen&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;

  &lt;span class="na"&gt;integrations&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;flutter_svg&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;

&lt;span class="na"&gt;flutter&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;assets&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;assets/images/icons/paint.svg&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;

&lt;span class="n"&gt;Widget&lt;/span&gt; &lt;span class="nf"&gt;build&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;BuildContext&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;Assets&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;images&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;icons&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;paint&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;svg&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="nl"&gt;width:&lt;/span&gt; &lt;span class="mi"&gt;120&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;height:&lt;/span&gt; &lt;span class="mi"&gt;120&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;In other cases, the asset is generated as String class.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;

&lt;span class="c1"&gt;// If don't use the Integrations.&lt;/span&gt;
&lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="n"&gt;svg&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;SvgPicture&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;asset&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Assets&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;images&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;icons&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;paint&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;rootBundle&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;loadString&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Assets&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;json&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;fruits&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;The root directory will be omitted if it is either &lt;strong&gt;&lt;code&gt;assets&lt;/code&gt;&lt;/strong&gt; or &lt;strong&gt;&lt;code&gt;asset&lt;/code&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

assets/images/chip3/chip.jpg  =&amp;gt; Assets.images.chip3.chip
assets/images/chip4/chip.jpg  =&amp;gt; Assets.images.chip4.chip
assets/images/icons/paint.svg =&amp;gt; Assets.images.icons.paint
assets/json/fruits.json       =&amp;gt; Assets.json.fruits
pictures/ocean_view.jpg       =&amp;gt; Assets.pictures.oceanView


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  Fonts
&lt;/h3&gt;

&lt;p&gt;Just follow the doc &lt;a href="https://flutter.dev/docs/cookbook/design/fonts" rel="noopener noreferrer"&gt;Use a custom font&lt;/a&gt; to specify fonts, then &lt;a href="https://github.com/FlutterGen/flutter_gen" rel="noopener noreferrer"&gt;FlutterGen&lt;/a&gt; will generate related dart files.&lt;br&gt;&lt;br&gt;
No other specific configuration is required.&lt;br&gt;&lt;br&gt;
&lt;em&gt;Ignore duplicated.&lt;/em&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;

&lt;span class="c1"&gt;# pubspec.yaml&lt;/span&gt;
&lt;span class="na"&gt;flutter&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;fonts&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;family&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Raleway&lt;/span&gt;
      &lt;span class="na"&gt;fonts&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;asset&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;assets/fonts/Raleway-Regular.ttf&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;asset&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;assets/fonts/Raleway-Italic.ttf&lt;/span&gt;
          &lt;span class="na"&gt;style&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;italic&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;family&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;RobotoMono&lt;/span&gt;
      &lt;span class="na"&gt;fonts&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;asset&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;assets/fonts/RobotoMono-Regular.ttf&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;asset&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;assets/fonts/RobotoMono-Bold.ttf&lt;/span&gt;
          &lt;span class="na"&gt;weight&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;700&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;These configurations will generate &lt;strong&gt;&lt;code&gt;fonts.gen.dart&lt;/code&gt;&lt;/strong&gt; under the &lt;strong&gt;&lt;code&gt;lib/gen/&lt;/code&gt;&lt;/strong&gt; directory by default.&lt;/p&gt;

&lt;h4&gt;
  
  
  Usage Example
&lt;/h4&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;

&lt;span class="n"&gt;Text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="s"&gt;'Hi there, I&lt;/span&gt;&lt;span class="se"&gt;\'&lt;/span&gt;&lt;span class="s"&gt;m FlutterGen'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;style:&lt;/span&gt; &lt;span class="n"&gt;TextStyle&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="nl"&gt;fontFamily:&lt;/span&gt; &lt;span class="n"&gt;FontFamily&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;robotoMono&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;fontFamilyFallback:&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;FontFamily&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;raleway&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="p"&gt;),&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  Colors
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://github.com/FlutterGen/flutter_gen" rel="noopener noreferrer"&gt;FlutterGen&lt;/a&gt; supports generating colors from &lt;a href="//example/assets/color/colors.xml"&gt;XML&lt;/a&gt; format files.&lt;br&gt;&lt;br&gt;
&lt;em&gt;Ignore duplicated.&lt;/em&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;

&lt;span class="c1"&gt;# pubspec.yaml&lt;/span&gt;
&lt;span class="na"&gt;flutter_gen&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;colors&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;inputs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;assets/color/colors.xml&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;assets/color/colors2.xml&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;a href="https://github.com/FlutterGen/flutter_gen" rel="noopener noreferrer"&gt;FlutterGen&lt;/a&gt; generates &lt;a href="https://api.flutter.dev/flutter/material/MaterialColor-class.html" rel="noopener noreferrer"&gt;MaterialColor&lt;/a&gt; class &lt;br&gt;
if the element has the attribute &lt;code&gt;type="material"&lt;/code&gt;, otherwise a normal &lt;a href="https://api.flutter.dev/flutter/material/Colors-class.html" rel="noopener noreferrer"&gt;Color&lt;/a&gt; class will be generated.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;

&lt;span class="nt"&gt;&amp;lt;color&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"milk_tea"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;#F5CB84&lt;span class="nt"&gt;&amp;lt;/color&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;color&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"cinnamon"&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"material"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;#955E1C&lt;span class="nt"&gt;&amp;lt;/color&amp;gt;&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;These configurations will generate &lt;strong&gt;&lt;code&gt;colors.gen.dart&lt;/code&gt;&lt;/strong&gt; under the &lt;strong&gt;&lt;code&gt;lib/gen/&lt;/code&gt;&lt;/strong&gt; directory by default.&lt;/p&gt;

&lt;h4&gt;
  
  
  Usage Example
&lt;/h4&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;

&lt;p&gt;&lt;span class="n"&gt;Text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;br&gt;
  &lt;span class="s"&gt;'Hi there, I&lt;/span&gt;&lt;span class="se"&gt;\'&lt;/span&gt;&lt;span class="s"&gt;m FlutterGen'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;br&gt;
  &lt;span class="nl"&gt;style:&lt;/span&gt; &lt;span class="n"&gt;TextStyle&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;br&gt;
    &lt;span class="nl"&gt;color:&lt;/span&gt; &lt;span class="n"&gt;ColorName&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;denim&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;br&gt;
  &lt;span class="p"&gt;),&lt;/span&gt;&lt;/p&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
&lt;br&gt;
  &lt;br&gt;
  &lt;br&gt;
  Conclusion&lt;br&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;We are looking for co-developers.&lt;/strong&gt; 😃&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>dart</category>
      <category>ios</category>
      <category>android</category>
    </item>
  </channel>
</rss>
