Skip to content

Commit 2256d5f

Browse files
johnpryanantfitch
andauthored
[flutter 3.35] Add "Working with AI" page (#12275)
This adds a docs page for http://docs.flutter.dev/ai/, and adds it to the "Create with AI" section in the sidebar. This doesn't contain any information about rules files for AI-assisted development yet. --------- Co-authored-by: Amanda Fitch <[email protected]>
1 parent f87eaf2 commit 2256d5f

File tree

2 files changed

+117
-18
lines changed

2 files changed

+117
-18
lines changed

src/_data/sidenav.yml

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -141,24 +141,6 @@
141141

142142
- title: App solutions
143143
children:
144-
- title: Create with AI
145-
children:
146-
- title: AI Toolkit
147-
permalink: /ai-toolkit
148-
expanded: true
149-
children:
150-
- title: Overview
151-
permalink: /ai-toolkit
152-
- title: User experience
153-
permalink: /ai-toolkit/user-experience
154-
- title: Feature integration
155-
permalink: /ai-toolkit/feature-integration
156-
- title: Custom LLM providers
157-
permalink: /ai-toolkit/custom-llm-providers
158-
- title: Chat client sample
159-
permalink: /ai-toolkit/chat-client-sample
160-
- title: Vertex AI in Firebase
161-
permalink: https://firebase.google.com/docs/vertex-ai/get-started?platform=flutter
162144
- title: Develop with Firebase
163145
children:
164146
- title: Overview
@@ -226,6 +208,28 @@
226208
- title: Build a news app
227209
permalink: /resources/news-toolkit
228210

211+
- title: Create with AI
212+
permalink: /ai
213+
children:
214+
- title: Overview
215+
permalink: /ai/create-with-ai
216+
- title: AI Toolkit
217+
permalink: /ai-toolkit
218+
expanded: false
219+
children:
220+
- title: Overview
221+
permalink: /ai-toolkit
222+
- title: User experience
223+
permalink: /ai-toolkit/user-experience
224+
- title: Feature integration
225+
permalink: /ai-toolkit/feature-integration
226+
- title: Custom LLM providers
227+
permalink: /ai-toolkit/custom-llm-providers
228+
- title: Chat client sample
229+
permalink: /ai-toolkit/chat-client-sample
230+
- title: Vertex AI in Firebase
231+
permalink: https://firebase.google.com/docs/vertex-ai/get-started?platform=flutter
232+
229233
- divider
230234
- header: User interface
231235
- title: Introduction

src/content/ai/create-with-ai.md

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
---
2+
title: Create with AI
3+
description: >
4+
Learn how to use AI to build Flutter apps, from powerful SDKs that integrate
5+
AI features directly into your app to tools that accelerate your development
6+
workflow.
7+
---
8+
9+
This guide covers how you can leverage AI tools to build AI-powered features for
10+
your Flutter apps and streamline your Flutter and Dart development.
11+
12+
## Build AI-powered experiences with Flutter
13+
14+
Using AI in your Flutter app unlocks new user experiences that allow your app
15+
to support natural language understanding and content generation.
16+
17+
To get started building AI-powered experiences in Flutter, check out these
18+
resources:
19+
20+
* [Firebase AI Logic][] - The official Firebase SDK for using generative AI
21+
features directly in Flutter. Compatible with the Gemini Developer API or
22+
Vertex AI. To get started, check out the
23+
[official documentation][firebase-ai-logic-docs].
24+
* [Flutter AI Toolkit][] - A sample app with pre-built widgets to help you build
25+
AI-powered features in Flutter
26+
27+
---
28+
29+
## AI development tools
30+
31+
AI can not only be a feature in your app, but also a powerful assistant in your
32+
development workflow. Tools like Gemini Code Assist and the Gemini CLI can help
33+
you write code faster, understand complex concepts, and reduce boilerplate.
34+
35+
### Gemini Code Assist
36+
37+
[Gemini Code Assist][] is an AI-powered collaborator available in Visual Studio Code
38+
and JetBrains IDEs (including Android Studio). It has a deep understanding of
39+
your project's codebase and can help you with:
40+
41+
* **Code completion and generation**: It suggests and generates entire blocks of
42+
code based on the context of what you're writing.
43+
* **In-editor chat**: You can ask questions about your code, Flutter concepts,
44+
or best practices directly within your IDE.
45+
* **Debugging and explanation**: If you encounter an error, you can ask Gemini
46+
Code Assist to explain it and suggest a fix, and
47+
[Dart and Flutter MCP Server][dart-mcp-flutter-docs]
48+
49+
50+
### Gemini CLI
51+
52+
The [Gemini CLI][] is a command-line AI workflow tool. It allows you to interact
53+
with Gemini models for a variety of tasks without leaving your development
54+
environment. You can use it to:
55+
56+
* Quickly scaffold a new Flutter widget, Dart function, or a complete app.
57+
* Use MCP server tools, such as the Dart and Flutter MCP server
58+
* Automate tasks like committing and pushing changes to a Git repository
59+
60+
To get started, visit the [Gemini CLI][] website, or try this
61+
[Gemini CLI codelab][].
62+
63+
---
64+
65+
## Dart and Flutter MCP Server
66+
67+
To provide assistance during Flutter development, AI tools such as
68+
Gemini Code Assist and Gemini CLI need to communicate with Dart
69+
and Flutter's developer tools. The Dart and
70+
Flutter MCP (model context protocol) Server facilitates this
71+
communication. The model context protocol is a specification that
72+
outlines how development tools can share the context of a user's code
73+
with an AI model, which allows the AI to better understand and interact
74+
with the code.
75+
76+
The Dart and Flutter MCP server provides a growing list of tools to analyze
77+
and fix errors, hot reload, get the selected widget, and more. This bridges
78+
the gap between the AI's natural language understanding, and
79+
Dart and Flutter's suite of developer tools.
80+
81+
To get started, check out the official documentation for the [Dart and Flutter MCP server][dart-mcp-dart-docs]
82+
on dart.dev and the [Dart and Flutter MCP repository][dart-mcp-github].
83+
84+
---
85+
86+
[Gemini Code Assist]: https://codeassist.google/
87+
[Gemini CLI]: {{site.github}}/google-gemini/gemini-cli
88+
[Gemini CLI codelab]: https://codelabs.developers.google.com/gemini-cli-hands-on
89+
[Firebase AI Logic]: {{site.firebase}}/docs/ai-logic
90+
[firebase-ai-logic-docs]: {{site.firebase}}/docs/ai-logic/get-started
91+
[How to build agentic apps with Flutter and Firebase AI Logic]: {{site.yt.watch}}/watch?v=xo271p-Fl_4
92+
[Flutter AI Toolkit]: {{site.url}}/ai-toolkit
93+
[dart-mcp-dart-docs]: {{site.dart-site}}/tools/mcp-server
94+
[dart-mcp-github]: {{site.github}}/dart-lang/ai/tree/main/pkgs/dart_mcp_server
95+
[dart-mcp-flutter-docs]: #dart-and-flutter-mcp-server

0 commit comments

Comments
 (0)