Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 12 additions & 16 deletions src/content/ai/genui/get-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,11 @@ to Gemini using the Firebase AI Logic, follow these instructions:
3. Follow the first three steps in [Firebase's Flutter setup guide][]
to add Firebase to your app.

4. In `pubspec.yaml`, add `genui` and `genui_firebase_ai`
to the `dependencies` section.

```yml
dependencies:
# ...
genui: ^latest_version # Replace with the actual latest version
genui_firebase_ai: ^latest_version # " "
4. Use `dart pub add` to add `genui` and `genui_firebase_ai` as
dependencies in your `pubspec.yaml` file.

```console
$ dart pub add genui genui_firebase_ai
```

5. In your app's `main` method, ensure that the widget
Expand Down Expand Up @@ -345,21 +342,19 @@ catalog of widgets.

To add your own widgets, use the following instructions.

1. Import `json_schema_builder`
1. Depend on the `json_schema_builder` package

Add the `json_schema_builder` package as a dependency in `pubspec.yaml`.
Use the same commit reference as the one for `genui`.
Use `dart pub add` to add `json_schema_builder` as
a dependency in your `pubspec.yaml` file:

```yml
dependencies:
# ...
json_schema_builder: ^latest_version # Replace with the actual latest version
```console
$ dart pub add json_schema_builder
```

2. Create the new widget's schema

Each catalog item needs a schema that defines the data required
to populate it. Using the json_schema_builder package,
to populate it. Using the `json_schema_builder` package,
define one for the new widget.

```dart
Expand All @@ -375,6 +370,7 @@ To add your own widgets, use the following instructions.
required: ['question', 'answer'],
);
```

3. Create a `CatalogItem`

Each `CatalogItem` represents a type of widget that the agent
Expand Down