<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" version="2.0">
    <channel>
        
        <title>
            <![CDATA[ Gemma3 - freeCodeCamp.org ]]>
        </title>
        <description>
            <![CDATA[ Browse thousands of programming tutorials written by experts. Learn Web Development, Data Science, DevOps, Security, and get developer career advice. ]]>
        </description>
        <link>https://www.freecodecamp.org/news/</link>
        <image>
            <url>https://cdn.freecodecamp.org/universal/favicons/favicon.png</url>
            <title>
                <![CDATA[ Gemma3 - freeCodeCamp.org ]]>
            </title>
            <link>https://www.freecodecamp.org/news/</link>
        </image>
        <generator>Eleventy</generator>
        <lastBuildDate>Tue, 26 May 2026 10:36:49 +0000</lastBuildDate>
        <atom:link href="https://www.freecodecamp.org/news/tag/gemma3/rss.xml" rel="self" type="application/rss+xml" />
        <ttl>60</ttl>
        
            <item>
                <title>
                    <![CDATA[ How to Build an AI-Powered Flutter App with Google Antigravity: A Hands-On Tutorial ]]>
                </title>
                <description>
                    <![CDATA[ As a Flutter developer who’s building a cloud-based ecosystem for digital media lifecycle management, I’m constantly looking for ways to speed up the transition from idea to prototype. In November 2025, Google launched antigravity, a new interactive ... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/build-an-ai-powered-flutter-app-with-google-antigravity/</link>
                <guid isPermaLink="false">695e974f4085b2f621c87405</guid>
                
                    <category>
                        <![CDATA[ AI ]]>
                    </category>
                
                    <category>
                        <![CDATA[ #ai-tools ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Google Antigravity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Flutter ]]>
                    </category>
                
                    <category>
                        <![CDATA[ gemma ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Gemma3 ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Anna Muzykina ]]>
                </dc:creator>
                <pubDate>Wed, 07 Jan 2026 17:26:39 +0000</pubDate>
                <media:content url="https://cdn.hashnode.com/res/hashnode/image/upload/v1767806742391/846769af-4cbe-482c-b884-8f9ca50d7456.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>As a Flutter developer who’s building a cloud-based ecosystem for digital media lifecycle management, I’m constantly looking for ways to speed up the transition from idea to prototype.</p>
<p>In November 2025, Google launched <a target="_blank" href="https://antigravity.google/blog/introducing-google-antigravity"><strong>antigravity</strong></a>, a new interactive coding platform that has fundamentally shifted my workflow.</p>
<p>Antigravity has completely <a target="_blank" href="https://www.youtube.com/watch?v=SVCBA-pBgt0&amp;t=2s">changed how fast you can prototype</a> and iterate on projects. Instead of writing boilerplate code or spending hours searching through documentation, you can describe your needs in natural language, review the plan, and let AI agents create, test, and even run the code.</p>
<p>This "coding in the air" approach creates the feeling of working with a very capable junior developer who never tires.</p>
<p>Based on my positive experience, I decided to share my first steps and thoughts about Antigravity. In this hands-on tutorial, we’ll create Water Tracker, a beautiful, modern Flutter app that helps users track their water intake with smart progress visualization and gentle reminders.</p>
<p>We’ll use Antigravity to let AI agents plan, write, test, and show video walkthroughs of your app. This “<a target="_blank" href="https://www.freecodecamp.org/news/how-to-use-vibe-coding-effectively-as-a-dev/">vibe coding</a>” style means that you describe what you want, review plans, and approve changes – all while agents handle the heavy lifting.</p>
<p>The app will feature a <a target="_blank" href="https://www.freecodecamp.org/news/glassmorphism-how-to-create-a-glass-card-in-figma/">glassmorphism</a> design: frosted glass cards, blurred backgrounds, subtle borders, and soft translucency. This will give the app a premium, modern feel that’s both elegant and calming.</p>
<h2 id="heading-heres-what-well-cover">Here's what we'll cover:</h2>
<ul>
<li><p><a class="post-section-overview" href="#heading-prerequisites">Prerequisites</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-understanding-the-antigravity-engine">Understanding the Antigravity Engine</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-prompts-the-key-to-successful-vibe-coding-in-antigravity">Prompts - the Key to Successful Vibe Coding in Antigravity</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-step-1-open-antigravity-and-create-a-workspace">Step 1: Open Antigravity and Create a Workspace</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-step-2-mastering-the-art-of-agentic-prompting">Step 2: Mastering the Art of Agentic Prompting</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-step-3-implement-the-glassmorphic-main-screen">Step 3: Implement the Glassmorphic Main Screen</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-step-4-add-persistence-and-daily-logic">Step 4: Add Persistence and Daily Logic</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-step-5-add-on-device-smart-reminders-with-gemma">Step 5: Add On-Device Smart Reminders with Gemma</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-step-6-final-polish">Step 6: Final Polish</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-antigravity-quota-limit">Antigravity quota limit</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-conclusion">Conclusion</a></p>
</li>
</ul>
<p>In this tutorial, we will build <strong>Water Tracker</strong>: a modern Flutter app featuring an attractive glassmorphism design. We will use Antigravity’s agentic workflow to handle the heavy lifting, including a circular progress visualization and on-device smart reminders powered by Gemma.</p>
<h2 id="heading-prerequisites">Prerequisites</h2>
<p>To follow along, you’ll need:</p>
<ul>
<li><p>Flutter SDK installed (Flutter doctor should be clean)</p>
</li>
<li><p>Android emulator or physical device</p>
</li>
<li><p>Google Antigravity installed (you can use the free public preview from <a target="_blank" href="https://antigravity.google/">antigravity.google</a>)</p>
</li>
</ul>
<h2 id="heading-understanding-the-antigravity-engine">Understanding the Antigravity Engine</h2>
<p>Before we dive into the code, it is important to understand what is happening under the hood. Unlike standard LLM chat interfaces that simply provide code snippets for you to copy-paste, Google Antigravity is an agentic development platform.</p>
<p>While the core is a familiar AI-powered IDE experience that uses the best of Google’s models, Antigravity is evolving the IDE towards an agent-first future with browser control capabilities, asynchronous interaction patterns, and an agent-first product form factor. Together, all this enables agents to autonomously plan and execute complex, end-to-end software tasks.</p>
<p>It connects to powerful Large Language Models, but it also has "tools" or "skills" that allow it to interact with your file system, run terminal commands like <code>flutter create</code>, and even execute the app in an emulator.</p>
<p>When you send a prompt, the system doesn't just guess the next word. It uses a reasoning loop to plan actions, execute them, and verify the output.</p>
<p>But because these agents can make autonomous decisions, your role shifts from "writer" to "editor and supervisor." You must verify the agents’ plans to ensure they follow best practices and don't introduce security or performance regressions.</p>
<h2 id="heading-prompts-the-key-to-successful-vibe-coding-in-antigravity"><strong>Prompts: the Key to Successful Vibe Coding in Antigravity</strong></h2>
<p>While building my platform, I learned that prompts for Google Antigravity are completely different from regular AI chats or code completers.</p>
<p>Antigravity is <strong>agentic</strong>. It means that AI agents can run commands, create files, launch apps, and test everything autonomously. This power means prompts must be structured like detailed instructions to a very capable junior developer, not short requests.</p>
<p>That's why every prompt in this tutorial follows the same pattern:</p>
<ul>
<li><p><strong>High-level goal + vibe</strong>: I describe the feature and the desired feel (for example, glassmorphism with soft blues, premium and calming).</p>
</li>
<li><p><strong>Detailed requirements in bullets</strong>: Functionality, UX, design, performance, accessibility – everything the agent needs to deliver quality on the first try.</p>
</li>
<li><p><strong>Plan-first safety</strong>: Always include something like, "Before any commands/code: generate a detailed plan artifact (folder tree, dependencies, steps) and ask for approval." This forces the agent to think first and lets me review/correct before anything changes.</p>
</li>
<li><p><strong>Verification request</strong>: Ask for screenshots and video walkthrough artifacts so I can visually check the result.</p>
</li>
<li><p><strong>No roles or fluff</strong>: Use direct, natural language. Agents don't need "You are an expert..." to work well.</p>
</li>
</ul>
<p>This style helps prevent mistakes (so agents can't run wild), ensures consistent premium quality (glassmorphism done right), and creates the relaxed "vibe coding" flow: you can focus on vision, approve plans, and get polished features fast.</p>
<p>Without this structure, agents might skip steps or produce basic results. With it, you get the beautiful, functional app we built together. In this tutorial I’ll share the prompts which I’m using.</p>
<h2 id="heading-step-1-open-antigravity-and-create-a-workspace">Step 1: Open Antigravity and Create a Workspace</h2>
<p>To get started, you’ll need to download and install the Antigravity IDE. It’s important to note that Antigravity is a standalone application, not a plugin or extension for your existing editor.</p>
<p>It’s built as a <strong>fork of Visual Studio Code</strong>, which means the setup is incredibly straightforward. If you have ever used VS Code, the interface will be instantly familiar, and you can even bring over your favorite shortcuts and themes. It functions as a standalone development environment that integrates the editor, terminal, and AI agents into a single window.</p>
<p>Next, open the Agent manager by clicking “Open Agent Manager” (either the button at the top or in the center of the screen, as you can see below):</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1766772585000/860da5bb-99f5-4e57-a3ef-18f93d4b6a54.png" alt="Open Agent Manager in Antigravity" class="image--center mx-auto" width="2382" height="1578" loading="lazy"></p>
<p>The panel on the left has an “+ Open Workspace” – just click that to create a new workspace:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1766432535748/016d64c0-3869-48f7-860d-0a6b087db01e.png" alt="Click &quot;Open Workspace&quot; to create a new workspace in Antigravity" class="image--center mx-auto" width="3398" height="1934" loading="lazy"></p>
<p>Then go ahead and click “Open New Workspace”:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1766432590892/24504fd9-e621-4ecd-b6d5-7d99ac0fd14a.png" alt="Open the workspace by clicking &quot;Open New Workspace&quot;" class="image--center mx-auto" width="3372" height="1340" loading="lazy"></p>
<p>Then just name it <code>water_tracker</code> and create it:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1766432640664/3d9a3522-6199-4659-a62d-ec199c87be2e.png" alt="Name and create the workspace" class="image--center mx-auto" width="3358" height="1912" loading="lazy"></p>
<p>Now you have a clean workspace ready for prompts:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1766432668236/e0df1845-6012-4732-97da-f45135d41680.png" alt="Workspace is now ready" class="image--center mx-auto" width="3376" height="1930" loading="lazy"></p>
<p>This creates a sandboxed environment where the AI agent can safely manage your files without affecting your other projects. And now your AI agents have the permission to build and test your Flutter code!</p>
<h2 id="heading-step-2-mastering-the-art-of-agentic-prompting">Step 2: Mastering the Art of Agentic Prompting</h2>
<p>In Antigravity, your success depends on how you communicate with your agents. Good prompts are detailed and always require a plan first. To create an effective prompt, you should think like a Project Manager: define the scope, set technical constraints, and establish a "checkpoint" before the agent executes any code.</p>
<h3 id="heading-the-anatomy-of-a-perfect-prompt">The Anatomy of a Perfect Prompt</h3>
<p>As we briefly discussed above, a strong prompt follows a clear structure: <strong>Context + Goal + Constraints + Verification</strong>. By explicitly asking for a plan, you prevent the agent from making assumptions about your architecture or UI style that might be difficult to undo later.</p>
<p>Copy and paste the following prompt into the Agent Manager:</p>
<pre><code class="lang-markdown">Create a new Flutter project named <span class="hljs-code">`water_tracker`</span>.

Design requirements:
<span class="hljs-bullet">-</span> Glassmorphism style throughout: frosted glass cards, blurred backgrounds, subtle borders, translucency
<span class="hljs-bullet">-</span> Soft color palette: light blues, whites, gentle gradients
<span class="hljs-bullet">-</span> Modern, premium feel with depth and elegance

Before any commands:
<span class="hljs-bullet">1.</span> Generate a detailed project plan artifact including:
<span class="hljs-bullet">   -</span> Full folder structure tree
<span class="hljs-bullet">   -</span> Recommended dependencies (e.g., shared<span class="hljs-emphasis">_preferences, glassmorphism package if available)
   - High-level architecture (simple state management to start)
2. Ask for my explicit approval.

After approval:
- Run `flutter create water_</span>tracker`
<span class="hljs-bullet">-</span> Add dependencies
<span class="hljs-bullet">-</span> Launch the blank app
<span class="hljs-bullet">-</span> Provide screenshots and video walkthrough artifact.
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1766433166692/2e0ba4b8-dbb0-4101-a2c6-a250ec318dbf.png" alt="Paste the prompt into the Agent Manager chat and click the blue &quot;+&quot; button" class="image--center mx-auto" width="3380" height="1928" loading="lazy"></p>
<h3 id="heading-analyzing-the-prompt-strategy">Analyzing the Prompt Strategy</h3>
<p>I crafted this prompt with specific "hooks" to ensure high-quality output:</p>
<ol>
<li><p>First, the <strong>Design requirements</strong> block uses sensory language ("frosted," "soft," "depth") to guide the agent's aesthetic choice.</p>
</li>
<li><p>Second, the <strong>"Before any commands"</strong> section is the most important element as it creates a safety gate. This forces the agent into a "Plan-First" mode, where it must present its logic as a readable document (an Artifact) before touching your file system.</p>
</li>
<li><p>Finally, the <strong>Verification</strong> requests (screenshots/video) ensure the agent is responsible for proving the setup was successful.</p>
</li>
</ol>
<h3 id="heading-reviewing-the-implementation-plan">Reviewing the Implementation Plan</h3>
<p>After running this prompt, agent will give you plan to review. Scroll down and read everything carefully, making sure the plan looks solid. If it does, reply by clicking on the <strong>"Proceed"</strong> button:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1766777527328/cceff62d-9cf3-4794-b8e6-65565598b4d8.png" alt="Review the response/plan and click proceed if you're happy with the results" class="image--center mx-auto" width="3358" height="1956" loading="lazy"></p>
<h3 id="heading-authorizing-commands-in-the-agent-manager">Authorizing Commands in the Agent Manager</h3>
<p>After you proceed with the plan, the agent will begin the <strong>Initializing Project</strong> phase. In Antigravity, agents do not run terminal commands in the background without your knowledge. Instead, they present the specific command for your authorization.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1766778411176/0ea3013b-e7b9-486f-ab3b-c65f2ef1b628.png" alt="&quot;Agent is running terminal commands&quot; - for you to review" class="image--center mx-auto" width="3344" height="1918" loading="lazy"></p>
<p>As shown in the above screenshot, the agent will ask to run: <code>flutter pub add provider shared_preferences intl flutter_animate google_fonts</code>.</p>
<p>Clicking <strong>"Accept"</strong> here is the specific action that gives the agent permission to actually execute the command in your workspace. This is the moment the project actually starts to exist, dependencies are added, and the initial folder structure is generated.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1766436979535/d5b65713-761a-4b3d-ad6e-ebea5be343d9.png" alt="Accept the agent's work" class="image--center mx-auto" width="3382" height="1932" loading="lazy"></p>
<h3 id="heading-managing-commands-and-folders">Managing Commands and Folders</h3>
<p>The "Step Requires Input" gate ensures you maintain full control over what’s being installed on your machine.</p>
<p>Before any directories are actually made, the agent displays the exact <code>mkdir</code> command it plans to run. You’ll need to review this proposed folder structure and click the blue <strong>"Accept"</strong> button to authorize the agent to physically create those paths in your workspace.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1766778588513/d348cab7-147a-4733-8a31-cf66010a2449.png" alt="Accept the agent creating specific paths in your workspace" class="image--center mx-auto" width="3366" height="1952" loading="lazy"></p>
<h3 id="heading-verifying-the-emulator-launch">Verifying the Emulator Launch</h3>
<p>Before launching on the emulator, the agent will ask for permission to launch it:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1766779040373/7cfcaf88-ba61-40d2-8eda-f100a65c0151.png" alt="Agent asking permission to launch emulator" class="image--center mx-auto" width="3362" height="1952" loading="lazy"></p>
<p>The agent will then initialize the project and show you the running app in the integrated emulator:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1766833166339/bab74ad2-d15a-4870-b767-1f8a08ca8836.png" alt="Agent showing the running app" class="image--center mx-auto" width="3422" height="1882" loading="lazy"></p>
<p>Also, the agent tests the app and records a few seconds of video to demonstrate that all buttons are working:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1766833182488/dad906af-b0a4-450d-9fcd-68b914c54c85.png" alt="dad906af-b0a4-450d-9fcd-68b914c54c85" class="image--center mx-auto" width="2790" height="1934" loading="lazy"></p>
<h2 id="heading-switching-to-the-editor-for-verification">Switching to the Editor for Verification</h2>
<p>Once the agent has finished initializing the project and building the directory structure, you’ll want to see the results of its work.</p>
<p>Because Antigravity is an agentic IDE, it often keeps the focus on the <strong>Agent Manager</strong> while it runs terminal commands and generates code in the background. To switch from the agent's log to the actual source code, click the “Open editor” button (the <code>&lt; &gt;</code> icon) located at the top right of the interface.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1767653383038/5f84773b-0b04-4417-9c1b-c992f1a9e9c1.png" alt="Checking project folders/files" class="image--center mx-auto" width="2310" height="1934" loading="lazy"></p>
<p>Clicking this button reveals the <strong>Explorer</strong> view on the left, where you can now see the newly created <code>water_tracker</code> project. You should explore the <code>lib/</code> directory to verify that the agent successfully created <code>main.dart</code> and organized your files into the <code>core</code>, <code>data</code>, and <code>ui</code> folders as proposed in its earlier plan.</p>
<p>This is your chance to perform a sanity check on the code itself. Open <code>main.dart</code> to ensure the agent correctly set up the <code>WaterTrackerApp</code> and initialized your theme before you proceed to the next stage of development.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1766783330487/83adf159-a017-40e6-9c93-299c243735ca.png" alt="Perform your sanity check" class="image--center mx-auto" width="2852" height="1770" loading="lazy"></p>
<h3 id="heading-understanding-orchestration-vs-verification">Understanding Orchestration vs. Verification</h3>
<p>Just to clarify, in Antigravity, the transition between the Agent Manager and the Open editor button (the <code>&lt; &gt;</code> icon) represents a shift from <strong>orchestration</strong> to <strong>verification</strong>:</p>
<ul>
<li><p><strong>The Agent Manager View (Orchestration)</strong>: When you click <strong>Open Agent Manager</strong>, you’re looking at the "command center" for the AI agents. In this view, you see a terminal-like interface where the agent proposes actions.<br>  For example, as seen in your screenshot, the agent shows a "Step Requires Input" and waits for you to click Accept on a terminal command like <code>flutter pub add</code>. You can’t edit code here – you can only approve or reject the agent's planned terminal operations.</p>
</li>
<li><p><strong>The Editor View (Verification)</strong>: When you click the <strong>'Open editor'</strong> button (the <code>&lt; &gt;</code> icon) in the top right, the IDE reveals the standard VS Code-style workspace. This is where the physical files (like <code>main.dart</code> and the folder structure you just authorized) actually appear.<br>  While the Agent Manager shows you the <em>log</em> of what the agent did, the Editor View allows you to open those files to verify that the code follows your standards and is ready for production.</p>
</li>
</ul>
<h3 id="heading-summary-of-workflow">Summary of Workflow</h3>
<p>In short: you use the Agent Manager to authorize the agent to run terminal commands and create folders, and you click the 'Open editor' button to actually see, explore, and edit the resulting files.</p>
<h2 id="heading-step-3-implement-the-glassmorphic-main-screen">Step 3: Implement the Glassmorphic Main Screen</h2>
<p>Now it’s time to create the beautiful UI. Glassmorphism relies on the <code>BackdropFilter</code> widget and <code>ClipRRect</code> to create that "frosted glass" effect. We want a central progress ring that shows how much water we’ve had and that feels physical and tactile.</p>
<p>Paste in the following prompt:</p>
<pre><code class="lang-markdown">Implement the main water tracking screen with glassmorphism design.

Detailed requirements:
<span class="hljs-bullet">-</span> Large central circular progress ring (frosted glass style, blurred background visible through it)
<span class="hljs-bullet">-</span> Big floating "+" button with glass effect and subtle glow on tap
<span class="hljs-bullet">-</span> Current intake text in large, elegant font
<span class="hljs-bullet">-</span> Glassmorphic card below showing "X glasses · Y ml of 2000 ml"
<span class="hljs-bullet">-</span> Scrollable history list in frosted cards
<span class="hljs-bullet">-</span> Empty state with calming illustration/text
<span class="hljs-bullet">-</span> Smooth fill animation on progress ring when adding water

Before coding:
<span class="hljs-bullet">1.</span> Plan artifact with:
<span class="hljs-bullet">   -</span> Glassmorphism implementation approach (BackdropFilter, ClipRRect, etc.)
<span class="hljs-bullet">   -</span> Widget hierarchy
<span class="hljs-bullet">   -</span> Animation details
<span class="hljs-bullet">2.</span> Ask approval.

After approval:
<span class="hljs-bullet">-</span> Generate code
<span class="hljs-bullet">-</span> Hot reload
<span class="hljs-bullet">-</span> Provide video walkthrough showing:
<span class="hljs-bullet">   -</span> Adding water multiple times
<span class="hljs-bullet">   -</span> Progress ring filling with glass effect
<span class="hljs-bullet">   -</span> History cards appearing
</code></pre>
<p>If all looks good, approve the plan. The agent should build a stunning glassmorphic interface. Tap “+” and watch the ring fill with a silky animation through the frosted glass.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1766835614486/1930f868-07a9-4264-95cc-af48f163549f.png" alt="Demo of the animation" class="image--center mx-auto" width="3428" height="1894" loading="lazy"></p>
<h2 id="heading-step-4-add-persistence-and-daily-logic">Step 4: Add Persistence and Daily Logic</h2>
<p>An app is only useful if it remembers your data. We’ll use <code>shared_preferences</code> for simple local storage. We also need logic that checks the current date and resets the counter to zero at midnight.</p>
<p>We’ll now ask the agent to add persistence and daily reset logic using shared_preferences.</p>
<p>The app should save the intake and the last reset date. Before implementing, explain how the midnight reset check will be triggered.</p>
<p>Use this prompt:</p>
<pre><code class="lang-markdown">Add persistence and daily reset.

Requirements:
<span class="hljs-bullet">-</span> Use shared<span class="hljs-emphasis">_preferences to save intake and last reset date
- Auto-reset to 0 ml at midnight
- Preserve today's history until reset
- Simple settings dialog to change daily goal

Before changes:
1. Plan with storage and reset logic
Ask approval.

After:
- Implement
- Test app close/reopen
- Video: add water → close → reopen → data persists</span>
</code></pre>
<p>Review the agent’s logic for the reset. A common pitfall is only checking the date when the app first opens – so make sure that the agent accounts for the app staying open in the background overnight.</p>
<p>Your progress now survives:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1766837605166/93c57ff2-c279-4897-b8b3-e2697b76064b.png" alt="Saved progress" class="image--center mx-auto" width="3380" height="1960" loading="lazy"></p>
<h2 id="heading-step-5-add-on-device-smart-reminders-with-gemma">Step 5: Add On-Device Smart Reminders with Gemma</h2>
<p>The most advanced feature of our Water Tracker is the smart reminder system powered by <strong>Gemma 3n</strong>. Unlike traditional reminders that use static, repetitive text, these reminders are generated dynamically to keep the user engaged and motivated. The primary goal of these reminders is to track the user's progress against their daily hydration goal and provide personalized nudges that ensure they stay on schedule throughout the day.</p>
<p>To achieve this, we’ll use Gemma 3n, which is a specialized variant of Google’s open-weight model family designed specifically for on-device performance. Gemma 3n acts as our AI Hydration Coach by analyzing the user's current intake status. For example, it notices if a user has only consumed 500ml out of their 2000ml goal by mid-afternoon. It then uses this context to generate a friendly, unique message.</p>
<p>We’re using Gemma 3n here for several critical reasons:</p>
<ul>
<li><p><strong>Privacy and data sovereignty</strong>: Because Gemma 3n runs fully locally on the user's phone, no personal health data or daily habits ever leave the device, providing a "privacy-first" experience where no data leaks to the cloud.</p>
</li>
<li><p><strong>Next-generation architecture</strong>: Gemma 3n uses the same architecture as the latest Gemini Nano, which allows it to offer incredible speed and efficiency while maintaining a minimal footprint on the device's battery and memory.</p>
</li>
<li><p><strong>Native multimodal support</strong>: This model is unique because it features native audio support for the first time, meaning that while we are currently using it for text notifications, the app is future-proofed for voice-based logging and interaction.</p>
</li>
</ul>
<p>Copy and paste in this prompt:</p>
<pre><code class="lang-markdown">Add on-device hydration reminders using Gemma.

Requirements:
<span class="hljs-bullet">-</span> Use flutter<span class="hljs-emphasis">_gemma or similar 2025 package for Gemma 3n
- Every 2 hours, check progress
- If behind schedule, show local notification: friendly, motivational message like "Time for a refreshing glass! You've had X of Y ml today."
- Use simple on-device prompt for variety
- Toggle in settings
- Privacy badge: "Reminders powered locally"

Before implementation:
1. Plan with package, notification setup, and timing logic
Ask approval.

After:
- Implement
- Test (simulate time or wait)
- Video showing notification appearing.</span>
</code></pre>
<p>You should verify that the agent is not making frequent, battery-draining calls to the model. The reminders should be scheduled efficiently using background tasks.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1766838947780/f051ad6e-383d-4965-ae41-dd939cb181c9.png" alt="Reminders with Gemma" class="image--center mx-auto" width="2822" height="1964" loading="lazy"></p>
<p>To test the AI Hydration Coach:</p>
<ol>
<li><p>Go to Settings (gear icon).</p>
</li>
<li><p>Enable the "AI Hydration Coach" toggle.</p>
</li>
<li><p>You should receive a simulated notification immediately with a motivational message like: <em>"Hydration Buddy 💧: Stay hydrated! You're at X% of your daily goal."</em></p>
</li>
</ol>
<h2 id="heading-step-6-final-polish">Step 6: Final Polish</h2>
<p>To finish the app, we will add micro-interactions – the small details that make an app feel premium. This includes a confetti celebration when the daily goal is met and a wave animation for the empty state.</p>
<p>Use this prompt:</p>
<pre><code class="lang-markdown">Add final polish:
<span class="hljs-bullet">-</span> Confetti explosion when reaching 100% goal
<span class="hljs-bullet">-</span> Glassmorphic settings screen
<span class="hljs-bullet">-</span> Better empty state with subtle wave animation
<span class="hljs-bullet">-</span> Optimize performance

Implement one at a time with quick video updates.
</code></pre>
<p>Run the app on your phone. Add water throughout the day and enjoy the glassmorphic beauty, gentle reminders, and celebration when you hit your goal.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1766840697130/8227c083-76af-4ab3-9b59-fd645e429dad.png" alt="Screenshot showing various app features like setting goals and saving" class="image--center mx-auto" width="3334" height="1938" loading="lazy"></p>
<p>Then go back to your app and click the ‘+’ button to get the results. After you get a score of 100%, the confetti will be visible:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1766839488270/7e9f12ce-0d68-45e5-a01d-1634f367e311.png" alt="Showing confetti when you reach your goal" class="image--center mx-auto" width="2992" height="1926" loading="lazy"></p>
<h3 id="heading-reviewing-the-final-changes">Reviewing the Final Changes</h3>
<p>As the agent works, use the <strong>'Open editor'</strong> button (the <code>&lt; &gt;</code> icon) to inspect the new animations. When checking the performance optimization, look for the agent's use of <code>RepaintBoundary</code> around the glassmorphic layers. This is a key indicator that the agent is following high-performance Flutter standards rather than just writing simple code.</p>
<p>Once every micro-interaction is verified, your Water Tracker is ready for primetime. Run it on your device, log your water throughout the day, and enjoy the combination of glassmorphic beauty, privacy-first reminders, and the celebration of your health goals.</p>
<h2 id="heading-antigravity-quota-limit"><strong>Antigravity Quota Limit</strong></h2>
<p>If your favorite model notifies you that it's reached its quota limit, you can switch to another model before the limit resets. As you can see in my screenshot, my favorite Gemini 3 Pro won’t be available until 8:26 PM, so I'll select another model from the drop-down menu to use before then.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1766831055155/c04b71e6-2949-4294-aa9b-3c8df8511c19.png" alt="Selecting another model to use" class="image--center mx-auto" width="1676" height="864" loading="lazy"></p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>In this tutorial, you built a helpful habit-tracking app using <strong>agentic development</strong>.</p>
<p>You learned about:</p>
<ul>
<li><p>Managing workspaces in Antigravity</p>
</li>
<li><p>Writing detailed, plan-first prompts</p>
</li>
<li><p>Creating glassmorphism designs</p>
</li>
<li><p>Integrating on-device AI with Gemma</p>
</li>
<li><p>Rapid, high-quality prototyping</p>
</li>
</ul>
<p>This is how modern Flutter development feels: focused on creativity, not boilerplate.</p>
<p>Happy vibe coding!</p>
 ]]>
                </content:encoded>
            </item>
        
    </channel>
</rss>
