Skip to content

Adding blog post on A2UI client side functions - #13794

Draft
sfshaza2 wants to merge 1 commit into
mainfrom
a2ui-client-side-functions
Draft

Adding blog post on A2UI client side functions#13794
sfshaza2 wants to merge 1 commit into
mainfrom
a2ui-client-side-functions

Conversation

@sfshaza2

Copy link
Copy Markdown
Contributor

As it says. Waiting for header image.

@sfshaza2
sfshaza2 requested a review from a team as a code owner August 24, 2026 22:20
@sfshaza2
sfshaza2 marked this pull request as draft August 24, 2026 22:20

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new blog post explaining how to use A2UI's client-side functions to delegate local operations to Dart code on a user's device. The review feedback identifies several syntax and formatting issues within the markdown file, including an invalid Dart enum reference in a code snippet, a missing backtick, a typo in 'executeSync', an empty markdown link, and a broken link syntax at the end of the document.


// 3. The expected return type for the binding.
@override
ClientFunctionReturnType get returnType => .string;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

In Dart, you cannot use a leading dot (.string) for enum values in this context. It should be fully qualified as ClientFunctionReturnType.string.

Suggested change
ClientFunctionReturnType get returnType => .string;
ClientFunctionReturnType get returnType => ClientFunctionReturnType.string;

1. `argumentSchema`: Built using
[`json_schema_builder`](https://pub.dev/packages/json_schema_builder),
this schema informs the LLM exactly which parameters are required
(`ingredient_id` and `quantity).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

There is a missing closing backtick for quantity in the list item.

[`json_schema_builder`](https://pub.dev/packages/json_schema_builder),
this schema informs the LLM exactly which parameters are required
(`ingredient_id` and `quantity).
1. `executeSyn`c: The core Dart method executed on the user's device

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

There is a typo in the inline code formatting: executeSync should be executeSync.

```

When initializing the conversation session,
[`genui`'s `PromptBuilder`]() inspects the catalog and automatically

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The markdown link for PromptBuilder is empty (()). Please provide the correct URL or remove the link brackets if it's not meant to be a link.

Comment on lines +245 to +249
[**flutter/demos** repository on GitHub](https://github.com/flutter/demos
to inspect the complete source code for Commis and other Dart GenUI samples.

Happy building!
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The markdown link starting on line 245 is missing its closing parenthesis, and there is a stray closing parenthesis on line 249. This causes the entire rest of the document to be treated as part of the link URL. Please close the link on line 245 and remove the parenthesis on line 249.

@flutter-website-bot

Copy link
Copy Markdown
Collaborator

Staged preview of the updated docs.flutter.dev site (updated for commit dd96053):

https://flutter-docs-prod--docs-pr13794-a2ui-client-side-funct-0p1n6v0y.web.app

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants